Skip to content

Commit ac0b7ca

Browse files
authored
fix: add retries for commands in kokoro macos cmake (#15730)
1 parent 4585661 commit ac0b7ca

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ci/kokoro/macos/builds/cmake-vcpkg.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ readonly NCPU
2929

3030
io::log_h2 "Update or install dependencies"
3131
# Install bash and ninja
32-
brew install bash ninja
32+
ci/retry-command.sh 3 60 brew install bash ninja
3333

3434
# Install a specific version of CMake to match our GHA builds
3535
(
@@ -40,18 +40,18 @@ brew install bash ninja
4040
git init
4141

4242
# Download the Homebrew formula for CMake==3.27.2
43-
curl -fsSL -o cmake.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/fd21fcf239bcd0231c9fed5719403ec128151af4/Formula/cmake.rb
43+
"${PROJECT_ROOT}/ci/retry-command.sh" 3 60 curl -fsSL -o cmake.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/fd21fcf239bcd0231c9fed5719403ec128151af4/Formula/cmake.rb
4444
mv cmake.rb ./Formula/
4545

4646
git add .
4747
git commit -m "Add CMake formula"
4848

4949
# Tap the local repository
50-
brew tap user/homebrew-tap "${HOME}/user/homebrew-tap"
50+
"${PROJECT_ROOT}/ci/retry-command.sh" 3 60 brew tap user/homebrew-tap "${HOME}/user/homebrew-tap"
5151

5252
# Uninstall existing CMake and install CMake from the local tap
5353
brew uninstall cmake
54-
brew install --build-from-source user/homebrew-tap/cmake
54+
"${PROJECT_ROOT}/ci/retry-command.sh" 3 60 brew install --build-from-source user/homebrew-tap/cmake
5555
)
5656

5757
io::log_h2 "Using CMake version"

0 commit comments

Comments
 (0)