diff --git a/.gitea/workflows/macos-probe.yaml b/.gitea/workflows/macos-probe.yaml index d338026..565625a 100644 --- a/.gitea/workflows/macos-probe.yaml +++ b/.gitea/workflows/macos-probe.yaml @@ -25,6 +25,8 @@ jobs: NIX_CONFIG: "experimental-features = nix-command flakes" steps: - uses: actions/checkout@v4 + - name: test (macOS — the gate only covers Linux) + run: nix develop -c cargo test --no-fail-fast - name: build, de-nix, sign, verify both darwin targets run: | set -e @@ -58,3 +60,22 @@ jobs: echo "OK: $t portable" done echo "=== both darwin targets built, de-nixed, signed, verified ===" + + - name: prune nix store — keep the last 2 toolchain generations + # The runner wipes the whole workspace before each run, so cargo target/ + # never accumulates (no sweep needed). The persistent caches are the nix + # store (/nix) and ~/.cargo (in $HOME). Bound the nix store by generation: + # record the current devShell closure as a generation of a persistent + # profile (lives in $HOME, survives the workspace wipe), keep the 2 newest + # (current + previous), reclaim what the older ones referenced. No time + # window — never more than two toolchains regardless of flake.lock churn. + if: always() + run: | + echo "--- disk before ---"; df -h / | tail -1 + P="$HOME/.cache/rdbms-ci/toolchain" + nix develop --profile "$P" -c true || true + nix-env -p "$P" --delete-generations +2 || true + nix-collect-garbage || true + echo "--- disk after ---"; df -h / | tail -1 + # ~/.cargo/registry also persists but grows only on Cargo.lock bumps; + # bound it later with `cargo-cache --autoclean` if it ever matters.