ci: Give each matrix leg its own ccache key - #200
Merged
DanielKellerM merged 1 commit intoAug 17, 2026
Conversation
github.job is the job id, so all six simulation legs and all eight elaboration legs keyed their cache identically. They then raced to save it: one won and the rest reported "Unable to reserve cache with key ccache-simulate-<sha>", so five of six suites stored nothing and would restore another suite's objects. The key comes from the matrix value now, passed into the composite action, which cannot see the matrix itself.
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.
Second defect from #198, found by reading the devel logs after #199 landed.
#199 fixed the compiler prefix - the logs now show
ccache g++-14 ...- but the cache still could not persist:github.jobis the job id, identical for every matrix leg, so all six simulation legs used one key and raced. One saved, five failed. The five that failed would also have restored a different suite's objects on the next run.Verified across the legs of one run - same key on all of them:
ccache-simulate-4d88f80d...ccache-simulate-4d88f80d...ccache-simulate-4d88f80d...ccache-simulate-4d88f80d...ccache-simulate-4d88f80d...The key now comes from the matrix value (
sim-<suite>,elab-<id>), passed in as an action input since a composite action cannot readmatrixitself.Intra-job caching already works:
mxquantreportedHits: 16 / 156 (10.26%)on a cold cache, the five widths sharing common objects. Cross-run hits need this fix plus one more run.