diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 49884d8..8a17301 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -55,7 +55,10 @@ jobs: - name: Prune Dagger cache before check env: DAGGER_NO_NAG: "1" - run: dagger query '{ engine { localCache { prune } } }' 2>/dev/null || true + # prune(maxUsedSpace) also reclaims named cache volumes (gradle-cache, go-build-cache, etc.) + # when total cache exceeds the limit; without args only unreferenced entries are removed. + run: | + dagger query '{ engine { localCache { prune(maxUsedSpace: "75gb", targetSpace: "50gb") } } }' || true - name: Run Full Check Suite env: @@ -66,7 +69,8 @@ jobs: if: always() env: DAGGER_NO_NAG: "1" - run: dagger query '{ engine { localCache { prune } } }' 2>/dev/null || true + run: | + dagger query '{ engine { localCache { prune(maxUsedSpace: "75gb", targetSpace: "50gb") } } }' || true - name: Cleanup TLS credentials if: always() diff --git a/Taskfile.yml b/Taskfile.yml index f9d7a10..9f28eab 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -288,7 +288,7 @@ tasks: echo "$(_ts) dagger: network error on attempt $attempt/3, retrying..." >&2 elif [ "$attempt" -lt 3 ] && grep -q "No space left on device" "$DAGGER_OUT"; then echo "$(_ts) dagger: disk space error on attempt $attempt/3, pruning Dagger cache..." >&2 - dagger query '{ engine { localCache { prune } } }' 2>/dev/null || true + dagger query '{ engine { localCache { prune(targetSpace: "20gb") } } }' 2>/dev/null || true echo "$(_ts) dagger: waiting 90s for freed space to settle..." >&2 sleep 90 else @@ -320,6 +320,12 @@ tasks: wait "$RECV_PID" 2>/dev/null || true exit $RC + dagger-prune: + desc: Prune the Dagger engine cache (keeps named volumes unless total exceeds 75 GB, then targets 50 GB) + cmds: + - | + dagger query '{ engine { localCache { prune(maxUsedSpace: "75gb", targetSpace: "50gb") } } }' + integration-android: desc: UI integration tests on a connected Android emulator (Stalwart on host, emulator reaches it via 10.0.2.2) deps: [_preflight, _android-sdk-check, _android-avd-setup]