diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 169b9e8..aecd396 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -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" diff --git a/ci/push-to-cache.sh b/ci/push-to-cache.sh index f108373..45e9bdd 100755 --- a/ci/push-to-cache.sh +++ b/ci/push-to-cache.sh @@ -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 diff --git a/docs/deployment.md b/docs/deployment.md index 9f5feb4..baaebbe 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -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`