forked from grpc/grpc-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmacos.sh
More file actions
executable file
·28 lines (21 loc) · 1005 Bytes
/
macos.sh
File metadata and controls
executable file
·28 lines (21 loc) · 1005 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
set -veux -o pipefail
CMAKE_VERSION=3.31.10
if [[ -f /VERSION ]]; then
cat /VERSION
fi
readonly GRPC_JAVA_DIR="$(cd "$(dirname "$0")"/../.. && pwd)"
DOWNLOAD_DIR=/tmp/source
mkdir -p ${DOWNLOAD_DIR}
curl -Ls https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-macos-universal.tar.gz | tar xz -C ${DOWNLOAD_DIR}
# We had problems with random tests timing out because it took seconds to do
# trivial (ns) operations. The Kokoro Mac machines have 2 cores with 4 logical
# threads, so Gradle should be using 4 workers by default.
export GRADLE_FLAGS="${GRADLE_FLAGS:-} --max-workers=2"
. "$GRPC_JAVA_DIR"/buildscripts/kokoro/kokoro.sh
trap spongify_logs EXIT
brew install --cask temurin@8
export PATH="$(/usr/libexec/java_home -v"1.8.0")/bin:${DOWNLOAD_DIR}/cmake-${CMAKE_VERSION}-macos-universal/CMake.app/Contents/bin:${PATH}"
export JAVA_HOME="$(/usr/libexec/java_home -v"1.8.0")"
brew install maven
"$GRPC_JAVA_DIR"/buildscripts/kokoro/unix.sh