Skip to content

ci: persist ccache across builds - #103

Merged
adeebshihadeh merged 7 commits into
commaai:masterfrom
greatgitsby:ci-ccache
Aug 24, 2026
Merged

ci: persist ccache across builds#103
adeebshihadeh merged 7 commits into
commaai:masterfrom
greatgitsby:ci-ccache

Conversation

@greatgitsby

@greatgitsby greatgitsby commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

CI cached whole build trees (*/*-src, */build, ~2 GB per platform with #101) under one key, and ccache's dir wasn't in it at all. Two problems: the git checkout --force every build.sh does rewrites mtimes on a restored tree, so everything recompiles anyway; and the entries are big enough to evict each other (repo cache is 10 GB), so a busy PR makes every other branch cold.

Now: cache only .ccache, keyed per run so it's always saved fresh (~300 MB), plus .uv-cache and the two download-only packages. Builds start from clean trees; ccache absorbs the compile. Also export the ccache compiler in ffmpeg (x264/zlib/meson) and cppcheck (make), which were bypassing it.

build job, master tree, empty commits between stages:

cold +ccache in old entry +export fix old entry evicted (cold) per-run ccache
linux-x86_64 10m36s 5m20s 3m44s 10m09s 4m08s
linux-arm64 6m27s 3m45s 3m06s 7m23s 3m40s
macos 6m17s 3m58s 3m10s 9m28s 4m34s

cache entries: 20–31 MB ccache per platform + 148 MB downloads, vs ~2 GB before.

@greatgitsby
greatgitsby marked this pull request as draft August 24, 2026 17:42
@greatgitsby
greatgitsby marked this pull request as ready for review August 24, 2026 18:04
@greatgitsby

greatgitsby commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

opensuse mirror is flaky (syncing now?)

separate issue.

@adeebshihadeh
adeebshihadeh merged commit 2f479b5 into commaai:master Aug 24, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants