Skip to content

Commit 514ab51

Browse files
committed
ci: use remote ccache only, drop the duplicate local cache
Builds already point ccache at the shared Redis (CCACHE_REMOTE_STORAGE, set per-runner by armbian/actions runner-clean). The local ccache directory is then a second copy of the same objects, written to the disk that is the builders' actual constraint: measured ~44 MB per 30 s per runner, against a device showing 2.2 s average write latency and queue depth 178 under the nightly load. CCACHE_REMOTE_ONLY is already supported by the ccache-remote extension and by ccache 4.9.1 on the runners; it just was never passed. It has to go here rather than in runner-clean's $GITHUB_ENV export, because docker.sh forwards a fixed env allowlist into the build container and CCACHE_* is not on it -- which is why CCACHE_REMOTE_STORAGE is passed as a compile.sh argument too. Set inside the existing 'remote storage is configured' guard, so a build without a remote keeps its local cache untouched. Trade-off, stated because it is real: there is no local fallback. If Redis is unreachable the cache is simply absent for that build and objects recompile. CCACHE_REDIS_CONNECT_TIMEOUT is 500 ms, so that costs lookups, not a stall. build-images-chunk.yml needs no change: it exports CCACHE_REMOTE_STORAGE to $GITHUB_ENV but never passes ccache params to compile.sh, so image builds use no ccache at all today. Kernel compiles happen in the artifacts path. Signed-off-by: Igor Pecovnik <igor@armbian.com>
1 parent 2e0b2af commit 514ab51

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎.github/workflows/build-artifacts-chunk.yml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,12 @@ jobs:
140140
# If the runner exported a remote ccache storage, pass it on and enable the ccache-remote extension.
141141
declare -a CCACHE_PARAMS=()
142142
if [ -n "${CCACHE_REMOTE_STORAGE}" ]; then
143-
CCACHE_PARAMS+=( "CCACHE_REMOTE_STORAGE=${CCACHE_REMOTE_STORAGE}" "ENABLE_EXTENSIONS=ccache-remote" )
143+
# CCACHE_REMOTE_ONLY: with a shared Redis cache the local ccache dir is pure
144+
# duplication -- measured ~44 MB per 30s per runner of writes to a disk that is
145+
# the builders' bottleneck. Only set inside this guard, so a build without a
146+
# remote keeps its local cache. Trade-off: no local fallback, so a Redis outage
147+
# means cache misses (500 ms per lookup, CCACHE_REDIS_CONNECT_TIMEOUT), not a hang.
148+
CCACHE_PARAMS+=( "CCACHE_REMOTE_STORAGE=${CCACHE_REMOTE_STORAGE}" "ENABLE_EXTENSIONS=ccache-remote" "CCACHE_REMOTE_ONLY=yes" )
144149
fi
145150
# Repeat on failure: retry the build up to BUILD_ATTEMPTS times to ride out transient
146151
# runner/network failures. Replaces the old external watchdog cron job.

0 commit comments

Comments
 (0)