fix(ci): correct ccache variable CCACHE_IGNOREOPTIONS (was non-existent REGEX variant)#449
Merged
Merged
Conversation
The variable CCACHE_IGNOREOPTIONSREGEX does not exist in ccache — it was silently ignored, so SLIC3R_DEV_TIMESTAMP stayed in the hash and every build saw ~90% cache misses regardless of warm caches. Per ccache 4.10 manual the correct variable is CCACHE_IGNOREOPTIONS, which uses shell wildcards (not regex): a trailing '*' matches any suffix. Changed '-DSLIC3R_DEV_TIMESTAMP=.*' (regex) to '-DSLIC3R_DEV_TIMESTAMP=*' (wildcard). Affects Debian, Fedora, Arch (cd-packages.yml) and Ubuntu, macOS (_build-core.yml). Expected: ~9% -> ~90%+ hit rate on the next warm run. Source: https://ccache.dev/manual/4.10.html (ignore_options)
BenJule
added a commit
that referenced
this pull request
Jun 4, 2026
## The real reason the cache never warmed up GitHub Actions caches are **immutable**. The `-latest` stable-key approach (PR #445) meant that once `ccache-<platform>-latest` existed (from #60, with broken timestamp hashes), every later save failed with **'Cache save failed'** — the stale cache was frozen forever. Even the correct `CCACHE_IGNOREOPTIONS` fix (#449) could never store a clean cache. ([github-action-benchmark#273](benchmark-action/github-action-benchmark#273)) ## Fix - Keys back to `ccache-<platform>-${{ github.run_id }}` — unique per run, save always succeeds; `restore-keys` prefix finds the newest previous cache. - `CCACHE_MAXSIZE` 5G → 2G so big ccache entries don't evict the small (165 MB) deps caches from the 10 GB repo limit — the original eviction problem `-latest` tried (and failed) to solve. After this + #449, the first warm run stores clean hashes, the next hits ~90%.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause of the persistent 9% hit rate
CCACHE_IGNOREOPTIONSREGEXdoes not exist in ccache — it was silently ignored. So-DSLIC3R_DEV_TIMESTAMP=<sekunde>stayed in the hash and every build had ~90% misses, even with a warm-latestcache (confirmed: cache restored successfully in #61, still 9.20% hits).Fix
Per the ccache 4.10 manual, the correct variable is
CCACHE_IGNOREOPTIONS, using shell wildcards (not regex) — a trailing*matches any suffix:CCACHE_IGNOREOPTIONSREGEX=-DSLIC3R_DEV_TIMESTAMP=.*(regex, ignored)CCACHE_IGNOREOPTIONS=-DSLIC3R_DEV_TIMESTAMP=*(wildcard, works)Applies to all 6 occurrences: Debian, Fedora, Arch, Ubuntu, macOS.
Expected: ~9% → ~90%+ hit rate on the next warm run → Linux builds drop from ~60 min to ~10 min.