Commit 1818874
Include Python patch version in CI cache keys (#315)
* Include Python patch version in CI cache keys
The venv and pre-commit caches hold virtualenvs whose python symlink
points at /opt/hostedtoolcache/Python/<patch>/... When the hosted
toolcache bumps patch versions (e.g. 3.13.12 -> 3.13.13), the symlink
dangles and every entry point fails with "required file not found".
Keying on steps.python.outputs.python-version invalidates the cache on
any patch bump.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Deduplicate cache-key generation via YAML anchor
Pulls the "Generate cache keys" step into a &cache-keys-step anchor so
all six jobs share one definition. Cache keys become short single-line
references and a future toolcache bump or hash location change touches
only the anchor.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Use YAML scalar anchors for cache keys instead of a shared step
Anchors the venv and pre-commit cache key strings directly. Folded
scalar line breaks sit inside ${{ ... }} expressions so they vanish at
evaluation time. Drops the helper step and the $GITHUB_OUTPUT
roundtrip.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a0d868e commit 1818874
1 file changed
+16
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | | - | |
61 | | - | |
62 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| |||
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
91 | | - | |
92 | | - | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | | - | |
106 | | - | |
| 104 | + | |
107 | 105 | | |
108 | 106 | | |
109 | 107 | | |
| |||
137 | 135 | | |
138 | 136 | | |
139 | 137 | | |
140 | | - | |
141 | | - | |
142 | | - | |
| 138 | + | |
143 | 139 | | |
144 | 140 | | |
145 | 141 | | |
| |||
150 | 146 | | |
151 | 147 | | |
152 | 148 | | |
153 | | - | |
154 | | - | |
155 | | - | |
| 149 | + | |
156 | 150 | | |
157 | 151 | | |
158 | 152 | | |
| |||
186 | 180 | | |
187 | 181 | | |
188 | 182 | | |
189 | | - | |
190 | | - | |
191 | | - | |
| 183 | + | |
192 | 184 | | |
193 | 185 | | |
194 | 186 | | |
| |||
199 | 191 | | |
200 | 192 | | |
201 | 193 | | |
202 | | - | |
203 | | - | |
204 | | - | |
| 194 | + | |
205 | 195 | | |
206 | 196 | | |
207 | 197 | | |
| |||
278 | 268 | | |
279 | 269 | | |
280 | 270 | | |
281 | | - | |
282 | | - | |
283 | | - | |
| 271 | + | |
284 | 272 | | |
285 | 273 | | |
286 | 274 | | |
| |||
330 | 318 | | |
331 | 319 | | |
332 | 320 | | |
333 | | - | |
334 | | - | |
335 | | - | |
| 321 | + | |
336 | 322 | | |
337 | 323 | | |
338 | 324 | | |
| |||
0 commit comments