From 6cfc1d29f1480b318560c39cc853ca68cb86e3dc Mon Sep 17 00:00:00 2001 From: austinried <4966622+austinried@users.noreply.github.com> Date: Fri, 16 Oct 2026 08:38:36 +0000 Subject: [PATCH] ci: fit the whole Nix store in the GitHub cache The GitHub job's store is ~7.3 GiB but gc-max-store-size-linux is 6G, and nothing roots the devshells, so cache-nix-action's pre-save `nix store gc` deletes whichever paths cross the cap before every save. The snapshots land missing the JDK and the Android SDK components, so both `nix develop` steps re-download or rebuild them on every run. Raise the cap to 10G, which clears the store, and bump the key to nix-v3-. The first run after that downloads the full closure once and saves a complete snapshot; the gutted nix-v2- snapshots are not restored, so there is one cold run per ref and v3 is warm from then on. Compressed at ~0.47x its store the snapshot is ~4.7 GiB at worst, inside the 10 GB per-repo budget. What pushes the repo over that budget today is the four stale gradle- (v1) entries, which no restore-key can reach and which age out by LRU. --- .github/actions/nix/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/nix/action.yml b/.github/actions/nix/action.yml index 39f0708d..d121842f 100644 --- a/.github/actions/nix/action.yml +++ b/.github/actions/nix/action.yml @@ -9,6 +9,6 @@ runs: extra_nix_config: experimental-features = nix-command flakes - uses: nix-community/cache-nix-action@7df957e333c1e5da7721f60227dbba6d06080569 # v7.0.2 with: - primary-key: nix-v2-${{ hashFiles('flake.lock', '**/*.nix') }} - restore-prefixes-first-match: nix-v2- - gc-max-store-size-linux: 6G + primary-key: nix-v3-${{ hashFiles('flake.lock', '**/*.nix') }} + restore-prefixes-first-match: nix-v3- + gc-max-store-size-linux: 10G