mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 15:11:58 +01:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user