Skip to content

ci: cache ccache across build and reprotest runs - #11

Closed
j4n wants to merge 1 commit into
masterfrom
j4n/ccache
Closed

j4n wants to merge 1 commit into
masterfrom
j4n/ccache

Conversation

@j4n

@j4n j4n commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Every leg recompiles from scratch each run, and reprotest recompiles twice more on top of that. This commit introduces ccache for both jobs, keyed per distro/arch; reprotest reuses the build job's artifacts. Cache size capped at --max-size=500M for now, stats logged; with these on the first (cold) run:

Cacheable calls:   1800 / 2374 (75.82%)
  Hits:              13 / 1800 ( 0.72%)
  Misses:          1787 / 1800 (99.28%)
  Cache size (GB): 0.13 / 2.00 ( 6.47%)

@j4n j4n self-assigned this Aug 5, 2026
@j4n
j4n force-pushed the j4n/ccache branch 2 times, most recently from 01d8896 to 52aac09 Compare August 6, 2026 15:51
@j4n
j4n requested a review from missytake August 6, 2026 15:51
Every leg recompiles from scratch each run, and reprotest recompiles
twice more on top of that. This commits introduces ccache for both jobs,
keyed per distro/arch; reprotest reuses the build job's artifacts.
Cache size capped at --max-size=500M, stats logged, roughly 150M now.
@hpk42

hpk42 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

"caching is hard": this caching business is tricky and to be frank, i don't think it's worth optimizing/thinking much about it right now as long as compiling dovecot is a very rare task. It would need thorough testing to ensure a) it helps b) doesn't break anything on multiple runs. Doing cold-compiles is more predictable and reproducable so i'd just stay with that for now.

@j4n

j4n commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

I was hoping it would shave off significant amounts of time from the new reprotest, but the results are too noisy across the few runs to support that hypothesis: At best, 44 vs 55 minutes, which is a long time either way; so closing this.

Job No cache (07-30) First cached run (08-10) Rerun 1 (08-25 07:28) Rerun 2 (08-25 09:00) Δ (no cache → rerun 2)
bookworm/amd64 build 26m41s 25m19s 23m45s 24m49s −1m52s
trixie/amd64 build 26m24s 25m40s 28m8s 24m11s −2m13s
bookworm/arm64 build 19m28s 18m53s 19m39s 18m36s −52s
trixie/arm64 build 19m12s 18m44s 19m57s 18m49s −23s
bookworm/amd64 reprotest 44m12s 48m34s 45m0s 48m39s +4m27s
trixie/amd64 reprotest 41m8s 33m18s 55m15s 44m45s +3m37s

If we ever need to go back to this, we should probably export CCACHE_DISABLE=1 for the second reprotest run so its not using cached artifacts.

@j4n j4n closed this Aug 25, 2026
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