Commit d26fe90
ci(swift): isolate SwiftPM cache per runner to end the prove-swift race
Two self-hosted macOS runners (tsavo-mac-x64 + -2) run under one user on
one host, so they share SwiftPM's global cache (~/Library/Caches/
org.swift.swiftpm). When two swift PRs build concurrently — one per runner —
both 'swift build' processes write that shared cache and race, failing the
prove-swift (macOS) C1-C8 job. Evidence: #1536 passed prove-swift solo; #1537
and #1539 both failed it running concurrently. The .build scratch dir is
already per-checkout; only the shared --cache-path was contended.
Thread an opt-in SWIFT_CACHE_PATH through the Makefile (build-swift +
test-swift) to 'swift build/test --cache-path', and set it to
${{ runner.temp }}/swiftpm-cache on both macOS swift jobs. RUNNER_TEMP is
per-runner-instance, so concurrent builds get distinct caches; sequential
builds on one runner still reuse it. Unset (local dev) keeps SwiftPM's
default — verified behavior-identical via 'make -n build-swift'.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 6b80f3f commit d26fe90
2 files changed
Lines changed: 23 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
331 | 338 | | |
332 | 339 | | |
333 | 340 | | |
| |||
612 | 619 | | |
613 | 620 | | |
614 | 621 | | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
615 | 628 | | |
616 | 629 | | |
617 | 630 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
291 | 299 | | |
292 | | - | |
| 300 | + | |
293 | 301 | | |
294 | 302 | | |
295 | 303 | | |
| |||
808 | 816 | | |
809 | 817 | | |
810 | 818 | | |
811 | | - | |
| 819 | + | |
812 | 820 | | |
813 | 821 | | |
814 | 822 | | |
| |||
0 commit comments