ci/cache: Keep collection in preflight
Group cache collection separately in the Actions log and avoid repeating it after updating the CI profile.
This commit is contained in:
@@ -37,9 +37,9 @@ jobs:
|
||||
env:
|
||||
HARMONIA_SSH_KEY: ${{ secrets.HARMONIA_SSH_KEY }}
|
||||
run: |
|
||||
# Make room before pushing so a full cache cannot prevent the GC at
|
||||
# the end of a successful run from ever being reached.
|
||||
echo "::group::Collect cache garbage"
|
||||
ci/push-to-cache.sh --gc
|
||||
echo "::endgroup::"
|
||||
|
||||
nix eval --json --apply "builtins.attrNames" .#ci.x86_64-linux | jq -cr '.[]' | while read job; do
|
||||
echo "::group::Build $job"
|
||||
|
||||
@@ -39,6 +39,4 @@ nix copy --no-check-sigs --to "$STORE_URI" "$path"
|
||||
if [ -n "$UPDATE_PROFILE" ]; then
|
||||
echo "Updating profile..."
|
||||
remote_cmd nix-env -p "$REMOTE_STORE"/nix/var/nix/profiles/nixfiles --set "$path"
|
||||
|
||||
collect_garbage
|
||||
fi
|
||||
|
||||
+3
-4
@@ -227,10 +227,9 @@ workflow deletes cache-profile generations older than its retention period, then
|
||||
unreachable paths so a full cache cannot prevent collection from being reached.
|
||||
|
||||
It then builds `.#ciDrv.x86_64-linux`, a `linkFarm` of all CI attributes, and pushes it with
|
||||
`UPDATE_PROFILE=1`. That updates the `nixfiles` profile on the cache box and collects old paths
|
||||
according to the workflow's retention setting. The SSH store uses `/var/lib/harmonia`,
|
||||
`HARMONIA_SSH_KEY`, and pinned `ci/known_hosts`; clients use `https://nix-cache.nul.ie` through
|
||||
`lib.my.c.nix.cache`.
|
||||
`UPDATE_PROFILE=1`. That updates the `nixfiles` profile on the cache box. The SSH store uses
|
||||
`/var/lib/harmonia`, `HARMONIA_SSH_KEY`, and pinned `ci/known_hosts`; clients use
|
||||
`https://nix-cache.nul.ie` through `lib.my.c.nix.cache`.
|
||||
|
||||
### `installer.yaml`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user