From 7ec8ceac73eb8277b257d9a9c8ca5298c9c982a9 Mon Sep 17 00:00:00 2001 From: Jon Ross-Perkins Date: Mon, 28 Oct 2024 14:44:30 -0700 Subject: [PATCH] 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. --- .github/actions/build-setup-macos/action.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/build-setup-macos/action.yml b/.github/actions/build-setup-macos/action.yml index 3caf1cda8a85..178fb5dc9436 100644 --- a/.github/actions/build-setup-macos/action.yml +++ b/.github/actions/build-setup-macos/action.yml @@ -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-" 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,