Try working around xcrun failures (#4449)

I expect the change here will try rerunning a couple times, then fail if
it's a permanent failure.

I've seen similar failures, and believe this is flaky. Here's the
specific example that caused me to try a workaround:

https://github.com/carbon-language/carbon-lang/actions/runs/11560505812/job/32177497296

I don't see a difference in the runner information between failing and
passing runs, which might've indicated a canary. That's why I'm doing
this as a trivial retry.
This commit is contained in:
Jon Ross-Perkins
2024-10-28 21:44:30 +00:00
committed by GitHub
parent 2c7166b2c9
commit 7ec8ceac73
+6 -1
View File
@@ -14,8 +14,13 @@ runs:
- name: Free up disk space
shell: bash
run: |
# The xcrun occasionally fails (maybe a race condition?), so retry a few
# times. Example failure:
# "data" couldn't be moved to "Deleting-<ID>"
echo '*** Delete iOS simulators'
xcrun simctl delete all
xcrun simctl delete all || \
xcrun simctl delete all || \
xcrun simctl delete all
sudo rm -rf ~/Library/Developer/CoreSimulator/Caches/*
# Install and cache LLVM 16 from Homebrew. Some runners may have LLVM 16,