Commit 41d4237
ENH: Optimize GitHub Actions ccache strategy with config-based keys
Improve the ccache caching strategy in pixi.yml and arm.yml:
- Key cache on OS + build config + build-system file hashes rather
than github.sha. This gives reuse when source files change but
the toolchain/build-config is still compatible, which is exactly
where ccache pays off. ccache itself handles source-level reuse.
- Add tiered restore-keys fallback (OS+config → OS-only) so PR
branches inherit the best available cache via GitHub's built-in
branch scoping (PRs can read default branch caches)
- Save cache on all branches (if: always()), not just main, so
PR branches benefit from incremental caches across pushes
- Bump cache key version to v3 to avoid restoring old caches
- Remove CCACHE_NODIRECT=1 to enable direct mode for better hit
rates (CCACHE_COMPILERCHECK=content already ensures correctness)
- Increase CCACHE_MAXSIZE from 2.4G to 5G to leverage larger
storage limits
- Use separate restore/save actions to support saving even on
build failure (if: always())
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent d338c1f commit 41d4237
2 files changed
Lines changed: 18 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | 97 | | |
99 | | - | |
| 98 | + | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
| |||
109 | 108 | | |
110 | 109 | | |
111 | 110 | | |
112 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
| |||
170 | 173 | | |
171 | 174 | | |
172 | 175 | | |
173 | | - | |
| 176 | + | |
174 | 177 | | |
175 | 178 | | |
176 | 179 | | |
177 | | - | |
| 180 | + | |
| 181 | + | |
178 | 182 | | |
179 | 183 | | |
180 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
58 | | - | |
| 57 | + | |
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
| |||
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
73 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
74 | 77 | | |
75 | 78 | | |
76 | 79 | | |
| |||
150 | 153 | | |
151 | 154 | | |
152 | 155 | | |
153 | | - | |
| 156 | + | |
154 | 157 | | |
155 | 158 | | |
156 | 159 | | |
157 | | - | |
| 160 | + | |
| 161 | + | |
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
| |||
0 commit comments