File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ jobs:
130130 runs-on : ubuntu-latest
131131
132132 env :
133+ NIXPKGS_CHANNEL : nixos-25.05
133134 NIX_EXTRA_CONFIG_ACT : |
134135 sandbox = false
135136 filter-syscalls = false
@@ -147,12 +148,25 @@ jobs:
147148 - name : Install Nix
148149 uses : cachix/install-nix-action@v31 # 2025-05-27, from https://github.com/cachix/install-nix-action/tags
149150 with :
150- nix_path : nixpkgs=channel:nixos-25.05 # latest release
151+ nix_path : nixpkgs=channel:${{ env.NIXPKGS_CHANNEL }} # latest release
151152 # Act executes inside an unprivileged container (Docker or Podman),
152153 # so KVM support isn't available.
153154 enable_kvm : " ${{ github.actor != 'nektos/act' }}"
154155 extra_nix_config : ${{ github.actor == 'nektos/act' && env.NIX_EXTRA_CONFIG_ACT || '' }}
155156
157+ # Cache the heaviest Nix job to stay within GitHub's cache budget while
158+ # still avoiding repeated gnu32 cross-toolchain downloads and builds.
159+ - name : Cache Nix store
160+ if : matrix.config == 'gnu32'
161+ uses : nix-community/cache-nix-action@v7
162+ with :
163+ primary-key : nix-${{ runner.os }}-${{ matrix.config }}-${{ env.NIXPKGS_CHANNEL }}-${{ hashFiles('shell.nix', 'ci/patches/*.patch', 'ci/configs/gnu32.bash') }}
164+ restore-prefixes-first-match : |
165+ nix-${{ runner.os }}-${{ matrix.config }}-${{ env.NIXPKGS_CHANNEL }}-
166+ nix-${{ runner.os }}-${{ matrix.config }}-
167+ nix-${{ runner.os }}-
168+ gc-max-store-size-linux : 3G
169+
156170 - name : Run CI script
157171 env :
158172 CI_CONFIG : ci/configs/${{ matrix.config }}.bash
You can’t perform that action at this time.
0 commit comments