Skip to content

Commit

Permalink
fix bazel_install for macos
Browse files Browse the repository at this point in the history
  • Loading branch information
PragmaTwice committed Jan 3, 2024
1 parent 79c4b4f commit 817c109
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions ci/run_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ install_bazel() {
# GRPC support bazel 6.3.2 https://grpc.github.io/grpc/core/md_doc_bazel_support.html
UNAME_OUT="$(uname -s)"
case "${UNAME_OUT}" in
Linux*) machine=linux;;
Darwin*) machine=darwin;;
Linux*) MACHINE=linux;;
Darwin*) MACHINE=darwin;;
*) echo "unknown machine: $UNAME_OUT"
esac
URL="https://github.com/bazelbuild/bazel/releases/download/6.3.2/bazel-6.3.2-installer-$machine-x86_64.sh"
URL="https://github.com/bazelbuild/bazel/releases/download/6.3.2/bazel-6.3.2-installer-$MACHINE-x86_64.sh"
wget -q -O install.sh $URL
chmod +x install.sh
set +x
Expand All @@ -69,10 +69,12 @@ install_bazel() {
rm -f install.sh
VERSION=`bazel version`
echo "bazel version: $VERSION"
MEM=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
JOBS=`expr $MEM / 1024 / 1024 / 3`
echo "build --jobs="$JOBS >> ~/.bazelrc
grep "jobs" ~/.bazelrc
if [[ "$MACHINE" == linux ]]; then
MEM=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
JOBS=`expr $MEM / 1024 / 1024 / 3`
echo "build --jobs="$JOBS >> ~/.bazelrc
grep "jobs" ~/.bazelrc
fi
}

JDKS=(
Expand Down

0 comments on commit 817c109

Please sign in to comment.