Commit d629173
committed
fix(ci): unify redundant LLVM cache keys
Recent PR runs exceeded GitHub Actions cache limits, causing LLVM to be recompiled on every workflow run. This led to hours-long turnaround times to verify changes. As a workaround, the fork workflow was being used to test the PR.
This commit simplifies the cache key structure to reduce redundant cache entries:
- Add `llvm-os-key` using container name or runs-on for OS versioning
- Make `llvm-archive-basename` conditional based on MSan only
- Transform cache keys to replace ":" with "-" for safety
- Only build instrumented libc++ for MSan where it's required
MSan requires all code, including libc++ to be instrumented to track initialization state correctly. ASan and UBSan can effectively catch errors without instrumenting dependencies, making custom libc++ builds low-ROI for these sanitizers.
Resulting cache key structure:
- MSan builds: include compiler, version, and sanitizer type
(e.g., llvm-dc4cef8-release-ubuntu-24.04-clang-21-MSan)
- All other builds: omit compiler info since ABI is compatible
(e.g., llvm-dc4cef8-release-ubuntu-24.04)
Non-sanitizer builds, ASan builds, and UBSan builds across gcc/clang versions on the same OS now share a single cache entry, as they produce ABI-compatible LLVM binaries.
Fixes #9811 parent 4e7ef04 commit d629173
1 file changed
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
| 85 | + | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
325 | 329 | | |
326 | 330 | | |
327 | 331 | | |
328 | 332 | | |
329 | 333 | | |
330 | | - | |
| 334 | + | |
331 | 335 | | |
332 | 336 | | |
333 | 337 | | |
| |||
1229 | 1233 | | |
1230 | 1234 | | |
1231 | 1235 | | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
1232 | 1240 | | |
1233 | 1241 | | |
1234 | 1242 | | |
| |||
1240 | 1248 | | |
1241 | 1249 | | |
1242 | 1250 | | |
1243 | | - | |
| 1251 | + | |
0 commit comments