From 39eb7c0ae7cbfdd201f436c6bd3490e96096728d Mon Sep 17 00:00:00 2001 From: Martijn Bastiaan Date: Wed, 13 Mar 2024 10:01:58 +0100 Subject: [PATCH] Make building OpenOCD deterministic --- .github/workflows/ci.yml | 34 +++++++++++++++++----------------- nix/openocd-vexriscv.nix | 6 +++++- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29cbd4fb0..9a0792cc5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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: @@ -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: @@ -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: @@ -259,7 +259,7 @@ jobs: needs: [build, lint, cc-sim-topologies-matrix, cc-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: @@ -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: @@ -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: @@ -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] @@ -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] @@ -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] @@ -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] @@ -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: @@ -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: @@ -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: @@ -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: @@ -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 @@ -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 diff --git a/nix/openocd-vexriscv.nix b/nix/openocd-vexriscv.nix index 2ec39bf06..f909cb744 100644 --- a/nix/openocd-vexriscv.nix +++ b/nix/openocd-vexriscv.nix @@ -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 = ''