ci(cache): Migrate Rust cache to runner-managed multi-level Redis and S3

Centralize cache service management in the Gitea runner for improved persistence and reliability using an SSD-backed S3 backend. This ensures robust verification of multi-tier cache operations.
This commit is contained in:
Nils Andreas Svee committed 2026-10-11 22:37:19 +07:00
1 parent 45be25b2be
commit 3c6bab64c4
9 files changed
+309 -83

No files matched your search

+4 -1
View File
@@ -2,11 +2,14 @@
set -eu
: "${SCCACHE_REDIS_ENDPOINT:?Set the persistent sccache Redis endpoint}"
: "${SCCACHE_ENDPOINT:?Set the persistent sccache S3 endpoint}"
: "${AWS_ACCESS_KEY_ID:?Supply the S3 access key through a BuildKit secret}"
: "${AWS_SECRET_ACCESS_KEY:?Supply the S3 secret key through a BuildKit secret}"
: "${JOBS:=8}"
case "$JOBS" in ''|*[!0-9]*|0) echo 'JOBS must be a positive integer' >&2; exit 1 ;; esac
sccache --start-server
trap 'sccache --show-stats; sccache --stop-server' EXIT
trap 'sccache-stats; sccache --stop-server' EXIT
sccache --zero-stats
# Bootstrap/Ninja does not inherit Make's job count. Bound both explicitly.
make package/rust/host/compile -j"$JOBS" RUST_BUILD_JOBS="$JOBS" || \