ci: bound runner disk + bust the disk-full-corrupted cargo target cache
apple / swift (push) Successful in 54s
ci / bench (push) Successful in 1m35s
ci / rust (push) Successful in 6m49s
android / android (push) Failing after 4m5s
ci / web (push) Successful in 26s
ci / docs-site (push) Successful in 26s
decky / build-publish (push) Successful in 29s
deb / build-publish (push) Failing after 2m33s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 16s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 2m40s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 2m32s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 2m17s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 21s
flatpak / build-publish (push) Failing after 4s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 5m27s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 5m28s
docker / deploy-docs (push) Successful in 20s

The self-hosted runner filled its disk (95%, builds failing on ENOSPC): every CI
push builds a sha-<commit>-tagged Docker image per pipeline, and since those tags
are never dangling a plain `docker image prune` skips them — they piled up to 589
images / ~85 GB plus 18 GB of build cache. Two parts:

- scripts/ci/docker-prune.{service,timer}: a host-level systemd timer (every 6h,
  Persistent) that prunes images/build-cache/containers older than 24h — in-use
  images stay protected. Checked in (the runner is hand-provisioned and shared
  across orgs) and already installed live; reclaimed 89 GB -> 39 GB (95% -> 42%).

- ci.yml / deb.yml: bump the `cargo-target-<rustc>-*` cache key to `-v2-`. The
  disk-full build let actions/cache save a truncated target/ (a dep's .rmeta went
  missing -> "error[E0463]: can't find crate for pem_rfc7468" while compiling der).
  A suffix bump is useless here — restore-keys would fall back to the poisoned
  prefix — so the prefix is versioned to force one clean rebuild. cargo-home is
  untouched (sources were intact; the failure was a missing build artifact).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-15 09:10:56 +00:00
parent df005e2963
commit bf65d264fd
4 changed files with 51 additions and 4 deletions
+28
View File
@@ -0,0 +1,28 @@
# Docker disk hygiene for the self-hosted Gitea Actions runner (home-runner-1, 192.168.1.52).
#
# Why this exists: every CI push builds and sha-<commit>-tags a Docker image per pipeline
# (rust-ci, web, docs, fedora-rpm, fedora44-rpm, ...). Those tags are never dangling, so a
# plain `docker image prune` SKIPS them and they accumulate forever — that is what filled the
# disk (589 images / ~85 GB, builds failing on ENOSPC). This trims everything older than 24h;
# images IN USE by a running container are always protected regardless of age.
#
# Host-level, not per-repo CI, because the runner is shared (punktfunk + other orgs all benefit).
#
# Install on the runner host (root):
# cp scripts/ci/docker-prune.{service,timer} /etc/systemd/system/
# systemctl daemon-reload && systemctl enable --now docker-prune.timer
# See also scripts/ci/setup-macos-runner.sh for the macOS runner.
[Unit]
Description=Prune aged Docker images / build cache (CI runner disk hygiene)
Documentation=https://git.unom.io/unom/punktfunk
Wants=docker.service
After=docker.service
[Service]
Type=oneshot
# '-' prefix: each step is independent — a no-op/failure never blocks the others.
ExecStart=-/usr/bin/docker image prune -af --filter until=24h
ExecStart=-/usr/bin/docker builder prune -af --filter until=24h
ExecStart=-/usr/bin/docker buildx prune -af --filter until=24h
ExecStart=-/usr/bin/docker container prune -f --filter until=24h
+13
View File
@@ -0,0 +1,13 @@
# Runs docker-prune.service every 6h. Persistent=true catches up after downtime.
# Install: see the header of docker-prune.service.
[Unit]
Description=Run docker-prune every 6h (CI runner disk hygiene)
[Timer]
OnCalendar=*-*-* 00/6:00:00
RandomizedDelaySec=600
Persistent=true
[Install]
WantedBy=timers.target