Skip to content

Commit 0f72994

Browse files
committed
Download specific cmake version as binary executable for macOS.
1 parent 1bd2197 commit 0f72994

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

buildscripts/kokoro/macos.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
#!/bin/bash
22
set -veux -o pipefail
3-
CMAKE_VERSION=3.26.3
3+
CMAKE_VERSION=3.31.10
44

55
if [[ -f /VERSION ]]; then
66
cat /VERSION
77
fi
88

99
readonly GRPC_JAVA_DIR="$(cd "$(dirname "$0")"/../.. && pwd)"
1010

11-
brew install cmake@${CMAKE_VERSION}
11+
DOWNLOAD_DIR=/tmp/source
12+
mkdir -p ${DOWNLOAD_DIR}
13+
curl -Ls https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-macos-universal.tar.gz | tar xz -C ${DOWNLOAD_DIR}
14+
1215
# We had problems with random tests timing out because it took seconds to do
1316
# trivial (ns) operations. The Kokoro Mac machines have 2 cores with 4 logical
1417
# threads, so Gradle should be using 4 workers by default.
@@ -18,6 +21,6 @@ export GRADLE_FLAGS="${GRADLE_FLAGS:-} --max-workers=2"
1821
trap spongify_logs EXIT
1922

2023
export -n JAVA_HOME
21-
export PATH="$(/usr/libexec/java_home -v"1.8.0")/bin:${PATH}"
24+
export PATH="$(/usr/libexec/java_home -v"1.8.0")/bin:${DOWNLOAD_DIR}/cmake-${CMAKE_VERSION}-macos-universal/CMake.app/Contents/bin:${PATH}"
2225

2326
"$GRPC_JAVA_DIR"/buildscripts/kokoro/unix.sh

0 commit comments

Comments
 (0)