Repository navigation
ci(build): Keep precompiled headers when caching with ccache - #3701
CryoTheRenegade wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. WalkthroughThe build workflow now configures ccache with Changesccache and precompiled headers
Estimated code review effort: 2 (Simple) | ~8 minutes Change: Other Possibly related PRs
Suggested labels: Suggested reviewers: Merge Risk:
|
[Medium impact] The PR appears safe to merge; weekly releases remain outside the changed cache path.
|
@xezon flagged a long CI run on #3697: Build Generals / win32-vcpkg-debug+t+e compiled for 22 minutes. #3608 caused this when it turned precompiled headers off for ccache builds.
#3608 turned precompiled headers off because ccache skipped every source that uses one. Without them, each cache miss compiles all of its headers from scratch. #3697 changed so many headers that 74% of compiles missed.
Turning precompiled headers off also made the debug caches bigger than
CCACHE_MAXSIZE=500M. ccache then evicted 150-500 entries per job, so even unchangedmainbuilds only got 62-76% hits.ccache can cache MSVC and VC6 compiles that use precompiled headers, as long as it is allowed to skip two checks it cannot do inside a precompiled header:
#definechanges and__DATE__/__TIME__.Side effect: on a cache hit, the
__DATE__/__TIME__thatWinMain.cppbuilds into CI artifacts can be out of date. Weekly releases do not use ccache.Evidence
GenCI on the fork branch, compile step of
Build Generals / win32-vcpkg-debug+t+e:On the full-cache run, all 19 jobs that had a saved cache got 100% hits, including all 8 VC6 jobs. Compiles took 20-37 s for VC6 and 38-75 s for MSVC. No job reported an uncacheable compile.
The saved caches are 334-383 MB for MSVC and 43-48 MB for VC6, about 4.2 GB in total. Upstream uses 6.44 GB now.