Skip to content

Commit 7673e03

Browse files
committed
ci: cache whole store (no gc-max) for native build, rely on weekly GC
1 parent c548fb6 commit 7673e03

2 files changed

Lines changed: 4 additions & 13 deletions

File tree

‎.github/actions/build-linux-native-package/action.yaml‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,6 @@ runs:
2626
nix build .#ccusage-static --print-build-logs
2727
fi
2828
29-
# Mirror the PR-token hardening from the build step above: on
30-
# `pull_request` runs (nix-github-token == 'false') the pin's `nix build`
31-
# and `nix eval` calls must also disable access tokens.
32-
- uses: ./.github/actions/pin-nix-deps
33-
env:
34-
NIX_CONFIG: ${{ inputs.nix-github-token == 'false' && 'access-tokens =' || '' }}
35-
with:
36-
attr: .#ccusage-static.cargoArtifacts
37-
3829
- name: Verify Linux binary is static
3930
shell: bash
4031
env:

‎.github/actions/setup-linux-nix-action-cache/action.yaml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
name: Setup Linux Nix (action cache, macOS-style)
22
description: >
33
Install Nix and restore/save the store with cache-nix-action, mirroring the
4-
macOS setup. Combined with the deps profile pin, the GC keeps the rooted
5-
cargoArtifacts while trimming the (substitutable) toolchain, so the cache
6-
stays under the GitHub Actions size limit but still warms the deps.
4+
macOS setup. No gc-max-store-size: the Blacksmith cache backend is unlimited,
5+
so we never garbage-collect before saving — the whole store (including the
6+
unrooted crane deps) is cached, exactly like macOS where the small store keeps
7+
GC from running ("Not collecting garbage").
78
runs:
89
using: composite
910
steps:
@@ -19,7 +20,6 @@ runs:
1920
with:
2021
primary-key: nix-buildnative-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('flake.lock', 'flake.nix', 'package.nix', 'nix/**/*.nix', 'rust-toolchain.toml', 'rust/Cargo.lock') }}
2122
restore-prefixes-first-match: nix-buildnative-${{ runner.os }}-${{ runner.arch }}-
22-
gc-max-store-size-linux: 4000000000
2323
purge: true
2424
purge-prefixes: nix-buildnative-${{ runner.os }}-${{ runner.arch }}-
2525
purge-created: 172800

0 commit comments

Comments
 (0)