Fix SwiftPM binary artifact cache collision in CI (#716)
After rm -rf of the SPM cache dir, recreate it as an empty directory so binary target downloads (e.g. Sentry.xcframework.zip) don't hit "already exists in file system" errors from stale artifacts on the self-hosted runner. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9d00ae9ab0
commit
dba1e232d3
3 changed files with 3 additions and 0 deletions
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
|
|
@ -144,6 +144,7 @@ jobs:
|
|||
if [ "$EXIT_CODE" -ne 0 ] && echo "$OUTPUT" | grep -q "Could not resolve package dependencies"; then
|
||||
echo "SwiftPM package resolution failed, clearing caches and retrying once"
|
||||
rm -rf ~/Library/Caches/org.swift.swiftpm
|
||||
mkdir -p ~/Library/Caches/org.swift.swiftpm
|
||||
rm -rf ~/Library/Developer/Xcode/DerivedData/GhosttyTabs-*
|
||||
set +e
|
||||
OUTPUT=$(run_unit_tests)
|
||||
|
|
|
|||
1
.github/workflows/nightly.yml
vendored
1
.github/workflows/nightly.yml
vendored
|
|
@ -128,6 +128,7 @@ jobs:
|
|||
- name: Clear SPM cache
|
||||
run: |
|
||||
rm -rf ~/Library/Caches/org.swift.swiftpm
|
||||
mkdir -p ~/Library/Caches/org.swift.swiftpm
|
||||
rm -rf ~/Library/Developer/Xcode/DerivedData/GhosttyTabs-*
|
||||
|
||||
- name: Configure SwiftPM cache
|
||||
|
|
|
|||
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
|
|
@ -123,6 +123,7 @@ jobs:
|
|||
if: steps.guard_release_assets.outputs.skip_all != 'true'
|
||||
run: |
|
||||
rm -rf ~/Library/Caches/org.swift.swiftpm
|
||||
mkdir -p ~/Library/Caches/org.swift.swiftpm
|
||||
rm -rf ~/Library/Developer/Xcode/DerivedData/GhosttyTabs-*
|
||||
|
||||
- name: Configure SwiftPM cache
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue