From 9f0d005ce62e5450f3d58167245769817e8d0295 Mon Sep 17 00:00:00 2001 From: Simon Mo Date: Sun, 24 Nov 2019 00:32:38 -0800 Subject: [PATCH] Use jobs 50 (#6255) --- ci/travis/install-ray.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ci/travis/install-ray.sh b/ci/travis/install-ray.sh index 234a6692c..c510b5d29 100755 --- a/ci/travis/install-ray.sh +++ b/ci/travis/install-ray.sh @@ -7,6 +7,15 @@ ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd) echo "PYTHON is $PYTHON" +# If we are in Travis, most of the compilation result will be cached. +# This means we are I/O bounded. By default, Bazel set the number of concurrent +# jobs to the the number cores on the machine, which are not efficient for +# network bounded cache downloading workload. Therefore we increase the number +# of jobs to 50 +if [[ "$TRAVIS" == "true" ]]; then + echo "build --jobs=50" >> $HOME/.bazelrc +fi + if [[ "$PYTHON" == "2.7" ]]; then pushd "$ROOT_DIR/../../python" @@ -32,8 +41,8 @@ elif [[ "$LINT" == "1" ]]; then pushd "$ROOT_DIR/../../python" python setup.py install --user popd - else echo "Unrecognized Python version." exit 1 fi +