Skip to content

Commit

Permalink
Make building OpenOCD deterministic (#477)
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnbastiaan committed Mar 19, 2024
1 parent b21ef9a commit b97aa04
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run:
shell: git-nix-shell {0} --option connect-timeout 360 --pure --keep "GITHUB_SHA" --keep "S3_PASSWORD"
container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-08
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-13
options: --memory=11g
steps:
- name: Checkout
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
shell: git-nix-shell {0} --option connect-timeout 360 --pure --keep "GITHUB_SHA" --keep "S3_PASSWORD"

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-08
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-13
options: --memory=11g

steps:
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
shell: git-nix-shell {0} --option connect-timeout 360 --pure --keep "GITHUB_OUTPUT"

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-08
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-13
options: --memory=11g

steps:
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
fail-fast: false

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-08
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-13
options: --memory=11g

steps:
Expand Down Expand Up @@ -259,7 +259,7 @@ jobs:
needs: [build, lint, elastic-buffer-sim-topologies-matrix, elastic-buffer-sim-topologies, bittide-instances-hardware-in-the-loop]

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-08
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-13
options: --memory=11g

steps:
Expand Down Expand Up @@ -337,7 +337,7 @@ jobs:
needs: [build, lint]

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-08
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-13
options: --memory=11g

steps:
Expand All @@ -364,7 +364,7 @@ jobs:
needs: [build, lint]

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-08
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-13
options: --memory=11g

steps:
Expand Down Expand Up @@ -399,7 +399,7 @@ jobs:
run:
shell: git-nix-shell {0} --option connect-timeout 360 --pure --keep "GITHUB_SHA" --keep "S3_PASSWORD"
container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-08
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-13
options: --memory=11g
needs: [build]

Expand All @@ -424,7 +424,7 @@ jobs:
run:
shell: git-nix-shell {0} --option connect-timeout 360 --pure --keep "GITHUB_SHA" --keep "S3_PASSWORD"
container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-08
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-13
options: --memory=11g
needs: [build]

Expand Down Expand Up @@ -452,7 +452,7 @@ jobs:
run:
shell: git-nix-shell {0} --option connect-timeout 360 --pure --keep "GITHUB_SHA" --keep "S3_PASSWORD"
container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-08
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-13
options: --memory=11g
needs: [build]

Expand All @@ -478,7 +478,7 @@ jobs:
run:
shell: git-nix-shell {0} --option connect-timeout 360 --pure --keep "GITHUB_SHA" --keep "S3_PASSWORD"
container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-08
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-13
options: --memory=11g
needs: [build]

Expand Down Expand Up @@ -511,7 +511,7 @@ jobs:
needs: [build, lint]

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-08
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-13
options: --memory=11g

steps:
Expand All @@ -538,7 +538,7 @@ jobs:
needs: [build, lint]

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-08
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-13
options: --memory=11g

steps:
Expand All @@ -564,7 +564,7 @@ jobs:
shell: git-nix-shell {0} --option connect-timeout 360 --pure --keep "GITHUB_OUTPUT"

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-08
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-13
options: --memory=11g

steps:
Expand Down Expand Up @@ -597,7 +597,7 @@ jobs:
shell: git-nix-shell {0} --option connect-timeout 360 --pure --keep "GITHUB_OUTPUT"

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-08
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-13
options: --memory=11g

steps:
Expand Down Expand Up @@ -640,7 +640,7 @@ jobs:
fail-fast: false

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-08
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-13
volumes:
- /opt/tools:/opt/tools
options: --init --mac-address="6c:5a:b0:6c:13:0b" --memory=11g
Expand Down Expand Up @@ -713,7 +713,7 @@ jobs:
fail-fast: false

container:
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-08
image: ghcr.io/clash-lang/nixos-bittide-hardware:2024-03-13
volumes:
- /opt/tools:/opt/tools
options: --memory=11g
Expand Down
6 changes: 5 additions & 1 deletion nix/openocd-vexriscv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ pkgs.stdenv.mkDerivation rec {
src = pkgs.fetchgit {
url = "https://github.com/SpinalHDL/openocd_riscv.git";
rev = "058dfa50d625893bee9fecf8d604141911fac125";
sha256 = "sha256-LbT0L+VDFLlSrLkHa0P5pfmZHJI5uaMazrLXj8WFpck=";
sha256 = "sha256-UuX4Zfr9DiJx60nvBAv+9xCbWXExrk5KNSC5V5e4rsw=";
fetchSubmodules = true;
deepClone = true;
postFetch = ''
# See: https://github.com/NixOS/nixpkgs/issues/8567#issuecomment-1846499599
find "$out/" -type d -name '.git' | xargs rm -rf
'';
};

installPhase = ''
Expand Down

0 comments on commit b97aa04

Please sign in to comment.