Cap the compiler cache so it survives to the next run - #368
Merged
estebanzimanyi merged 1 commit intoSep 5, 2026
Merged
Conversation
A repository gets 10 GB for every Actions cache it holds, and the distribution workflow allows each job 5 GB, so a matrix of seven architectures overruns the budget and GitHub evicts least-recently-used to make room. The entries that lose that race are the small ones. The Linux leg reads `cache hit (direct) 0`, `cache miss 724`, `cache hit rate 0.00 %`, so every object compiles from scratch and the single "Build extension (inside Docker)" step takes 46 minutes of a 51-minute job. It is not branch scoping: run 33743717496 is a push to main, reading and writing the default-branch scope, and misses the same way. Naming a ceiling in `test_env_variables` reaches the build because that input is appended to the Docker environment file after the workflow writes its own defaults, and a later assignment wins there. 500M is generous against what the base branch holds, 33 to 54 MB per architecture, so it bounds the budget without bounding any real working set. The macOS and Windows legs take their ceiling from the ccache action rather than this file and are unchanged. With an entry left to restore, the same Linux leg reads `cache hit rate 49.65 %` and finishes in 7 minutes, and the macOS leg in 4.
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.
A repository gets 10 GB for every Actions cache it holds, and the
distribution workflow allows each job 5 GB, so a matrix of seven
architectures overruns the budget and GitHub evicts least-recently-used to
make room. The entries that lose that race are the small ones.
The Linux leg reads
cache hit (direct) 0,cache miss 724,cache hit rate 0.00 %, so every object compiles from scratch and thesingle "Build extension (inside Docker)" step takes 46 minutes of a
51-minute job. It is not branch scoping: run 33743717496 is a push to main,
reading and writing the default-branch scope, and misses the same way.
Naming a ceiling in
test_env_variablesreaches the build because thatinput is appended to the Docker environment file after the workflow writes
its own defaults, and a later assignment wins there. 500M is generous
against what the base branch holds, 33 to 54 MB per architecture, so it
bounds the budget without bounding any real working set. The macOS and
Windows legs take their ceiling from the ccache action rather than this
file and are unchanged.
With an entry left to restore, the same Linux leg reads
cache hit rate 49.65 %and finishes in 7 minutes, and the macOS leg in 4.