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:
|
env:
|
||||||
HARMONIA_SSH_KEY: ${{ secrets.HARMONIA_SSH_KEY }}
|
HARMONIA_SSH_KEY: ${{ secrets.HARMONIA_SSH_KEY }}
|
||||||
run: |
|
run: |
|
||||||
# Make room before pushing so a full cache cannot prevent the GC at
|
echo "::group::Collect cache garbage"
|
||||||
# the end of a successful run from ever being reached.
|
|
||||||
ci/push-to-cache.sh --gc
|
ci/push-to-cache.sh --gc
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
nix eval --json --apply "builtins.attrNames" .#ci.x86_64-linux | jq -cr '.[]' | while read job; do
|
nix eval --json --apply "builtins.attrNames" .#ci.x86_64-linux | jq -cr '.[]' | while read job; do
|
||||||
echo "::group::Build $job"
|
echo "::group::Build $job"
|
||||||
|
|||||||
@@ -39,6 +39,4 @@ nix copy --no-check-sigs --to "$STORE_URI" "$path"
|
|||||||
if [ -n "$UPDATE_PROFILE" ]; then
|
if [ -n "$UPDATE_PROFILE" ]; then
|
||||||
echo "Updating profile..."
|
echo "Updating profile..."
|
||||||
remote_cmd nix-env -p "$REMOTE_STORE"/nix/var/nix/profiles/nixfiles --set "$path"
|
remote_cmd nix-env -p "$REMOTE_STORE"/nix/var/nix/profiles/nixfiles --set "$path"
|
||||||
|
|
||||||
collect_garbage
|
|
||||||
fi
|
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.
|
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
|
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
|
`UPDATE_PROFILE=1`. That updates the `nixfiles` profile on the cache box. The SSH store uses
|
||||||
according to the workflow's retention setting. The SSH store uses `/var/lib/harmonia`,
|
`/var/lib/harmonia`, `HARMONIA_SSH_KEY`, and pinned `ci/known_hosts`; clients use
|
||||||
`HARMONIA_SSH_KEY`, and pinned `ci/known_hosts`; clients use `https://nix-cache.nul.ie` through
|
`https://nix-cache.nul.ie` through `lib.my.c.nix.cache`.
|
||||||
`lib.my.c.nix.cache`.
|
|
||||||
|
|
||||||
### `installer.yaml`
|
### `installer.yaml`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user