Skip to content

Commit

Permalink
Run Bash in safe mode by default on CI (#313)
Browse files Browse the repository at this point in the history
Co-authored-by: Hidde Moll <hidde@qbaylogic.com>
  • Loading branch information
martijnbastiaan and hiddemoll committed Jun 23, 2023
1 parent e64c56e commit 478f300
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ RUN \
nix-shell -j32 --run "echo OK"

RUN \
echo '#!/usr/bin/env bash' >> /usr/bin/git-nix-shell && \
echo 'nix-shell "${GITHUB_WORKSPACE}/shell.nix" "${@:2}" --run "bash $1"' >> /usr/bin/git-nix-shell && \
echo '#!/usr/bin/env bash' >> /usr/bin/git-nix-shell && \
echo 'nix-shell "${GITHUB_WORKSPACE}/shell.nix" "${@:2}" --run "bash -euf -o pipefail $1"' >> /usr/bin/git-nix-shell && \
chmod +x /usr/bin/git-nix-shell
29 changes: 15 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
shell: git-nix-shell {0} --pure

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-22
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-23

steps:
- name: Checkout
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
shell: git-nix-shell {0} --pure --keep "GITHUB_OUTPUT"

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-22
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-23

steps:
- name: Checkout
Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
fail-fast: false

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-22
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-23

steps:
- name: Checkout
Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:
needs: [build, lint, elastic-buffer-sim-topologies-matrix, elastic-buffer-sim-topologies]

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-22
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-23

steps:
- name: Download simulation artifacts
Expand All @@ -242,6 +242,7 @@ jobs:
- name: Generate final report
shell: git-nix-shell {0} --pure
run: |
set +f # Enable globbing
pdfunite artifacts/*/report.pdf report.pdf
- name: Upload report
Expand All @@ -260,7 +261,7 @@ jobs:
needs: [build, lint]

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-22
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-23

steps:
- name: Checkout
Expand Down Expand Up @@ -298,7 +299,7 @@ jobs:
needs: [build, lint]

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-22
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-23

steps:
- name: Checkout
Expand Down Expand Up @@ -344,7 +345,7 @@ jobs:
run:
shell: git-nix-shell {0} --pure
container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-22
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-23

steps:
- name: Checkout
Expand Down Expand Up @@ -375,7 +376,7 @@ jobs:
run:
shell: git-nix-shell {0} --pure
container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-22
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-23
needs: [build]

steps:
Expand Down Expand Up @@ -427,7 +428,7 @@ jobs:
run:
shell: git-nix-shell {0} --pure
container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-22
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-23

steps:
- name: Checkout
Expand Down Expand Up @@ -457,7 +458,7 @@ jobs:
run:
shell: git-nix-shell {0} --pure
container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-22
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-23

steps:
- name: Checkout
Expand Down Expand Up @@ -496,7 +497,7 @@ jobs:
needs: [build, lint]

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-22
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-23

steps:
- name: Checkout
Expand Down Expand Up @@ -534,7 +535,7 @@ jobs:
needs: [build, lint]

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-22
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-23

steps:
- name: Checkout
Expand Down Expand Up @@ -567,7 +568,7 @@ jobs:
name: bittide-instances synthesis matrix generation
runs-on: [self-hosted, compute]
container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-22
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-23
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -606,7 +607,7 @@ jobs:
fail-fast: false

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-22
image: ghcr.io/clash-lang/nixos-bittide-hardware:2023-06-23
volumes:
- /opt/tools:/opt/tools
options: --mac-address="6c:5a:b0:6c:13:0b"
Expand Down

0 comments on commit 478f300

Please sign in to comment.