Commit 10c08b2
ci: key Windows sccache cache on MSVC version (#787)
## What
Add the `cl.exe` version to the Windows sccache cache key (and its
restore-keys prefix) in `test` and `sql_catalog_test`, so each MSVC
build keeps its own cache. On the `sql_catalog_test` matrix the suffix
stays empty for the non-Windows legs, so their keys don't change.
## Why
sccache decides whether a cached object is still valid from the compiler
binary. GitHub patches the Windows runner image regularly, roughly once
a week, and rolls each update out across the hosted fleet over a few
days rather than all at once. During that window back-to-back runs can
land on different `cl.exe` builds. When that happens the two builds
share one cache key and keep evicting each other, and a run on a newer
compiler restores the old cache, misses everything, and rebuilds the
whole stack (around 35 to 50 minutes). Putting the `cl.exe` version in
the key gives each compiler its own cache, so a run stays warm instead
of recompiling.
## Validation
On the `windows-2025` runner the resolve step read `cl.exe` as
19.51.36248, and the Windows `test` and `sql_catalog_test` builds passed
with the version in the key. The cache is only saved on `main`, so the
warm reuse shows up there rather than on a branch run.
Co-authored-by: Abanoub Doss <abanoub.doss@gmail.com>1 parent b65352a commit 10c08b2
2 files changed
Lines changed: 44 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
77 | 97 | | |
78 | 98 | | |
79 | 99 | | |
| |||
99 | 119 | | |
100 | 120 | | |
101 | 121 | | |
102 | | - | |
| 122 | + | |
103 | 123 | | |
104 | | - | |
| 124 | + | |
105 | 125 | | |
106 | 126 | | |
107 | 127 | | |
| |||
129 | 149 | | |
130 | 150 | | |
131 | 151 | | |
132 | | - | |
| 152 | + | |
133 | 153 | | |
134 | 154 | | |
135 | 155 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
147 | 165 | | |
148 | 166 | | |
149 | 167 | | |
| |||
159 | 177 | | |
160 | 178 | | |
161 | 179 | | |
162 | | - | |
| 180 | + | |
163 | 181 | | |
164 | | - | |
| 182 | + | |
165 | 183 | | |
166 | 184 | | |
167 | 185 | | |
| |||
176 | 194 | | |
177 | 195 | | |
178 | 196 | | |
179 | | - | |
| 197 | + | |
180 | 198 | | |
181 | 199 | | |
182 | 200 | | |
| |||
0 commit comments