Skip to content

Commit d9396a5

Browse files
ci: Attempt to make macOS builds more reliable
The macOS CI tasks often error fail when doing `brew update` with git fetch errors: ``` remote: fatal: packfile /data/repositories/b/nw/b6/07/5c/123272362/network.git/objects/pack/pack-2139bd07361b62a358e380a0e7d58ec35593d191.pack cannot be accessed fatal: protocol error: bad pack header Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed! ``` Superficially this seems to be a problem on the GitHub server because the message shows a "remote" error. But it seems we're the only one in the world running into this specific issue when doing `brew update`, so it's more likely that the something else is the culprit, and this error message is just a symptom. This commit replaces `brew update` with a complete reinstallation of brew. This is essentially a shot in the dark but it's worth a try, and I doubt it's significantly more expensive. If that won't work, we may consider simply retrying `brew update` a few times.
1 parent d8a2463 commit d9396a5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.cirrus.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ task:
135135
## - rm /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
136136
##
137137
brew_valgrind_pre_script:
138-
- brew update
138+
# Reinstall brew. We could do `brew update` instead but that often fails.
139+
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
140+
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
139141
- brew config
140142
- brew tap LouisBrunner/valgrind
141143
# Fetch valgrind source but don't build it yet.

0 commit comments

Comments
 (0)