Use bazel disk cache for all CI jobs (#5144)

This commit is contained in:
Hao Chen 2019-07-10 22:03:45 +08:00 committed by GitHub
parent 0b540ab492
commit 0c34749779
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 8 deletions

View file

@ -112,8 +112,11 @@ matrix:
- if [ $RAY_CI_LINUX_WHEELS_AFFECTED != "1" ]; then exit; fi
- ./ci/suppress_output ./ci/travis/install-dependencies.sh
# This command should be kept in sync with ray/python/README-building-wheels.md.
- ./ci/suppress_output docker run --rm -w /ray -v `pwd`:/ray -ti rayproject/arrow_linux_x86_64_base:latest /ray/python/build-wheel-manylinux1.sh
# Mount bazel cache dir to the docker container.
- export MOUNT_BAZEL_CACHE="-v $HOME/ray-bazel-cache:/root/ray-bazel-cache -e TRAVIS=true"
# This command should be kept in sync with ray/python/README-building-wheels.md,
# except the `$MOUNT_BAZEL_CACHE` part.
- ./ci/suppress_output docker run --rm -w /ray -v `pwd`:/ray $MOUNT_BAZEL_CACHE -ti rayproject/arrow_linux_x86_64_base:latest /ray/python/build-wheel-manylinux1.sh
script:
- if [ $RAY_CI_LINUX_WHEELS_AFFECTED != "1" ]; then exit; fi
@ -140,7 +143,6 @@ install:
- if [ $RAY_CI_TUNE_AFFECTED != "1" ] && [ $RAY_CI_RLLIB_AFFECTED != "1" ] && [ $RAY_CI_PYTHON_AFFECTED != "1" ]; then exit; fi
- ./ci/suppress_output ./ci/travis/install-bazel.sh
- ./ci/suppress_output ./ci/travis/setup-bazel-cache.sh
- ./ci/suppress_output ./ci/travis/install-dependencies.sh
- export PATH="$HOME/miniconda/bin:$PATH"
- ./ci/suppress_output ./ci/travis/install-ray.sh

View file

@ -21,3 +21,9 @@ wget -O install.sh $URL
chmod +x install.sh
./install.sh --user
rm -f install.sh
if [[ "$TRAVIS" == "true" ]]; then
# Use bazel disk cache if this script is running in Travis.
mkdir -p $HOME/ray-bazel-cache
echo "build --disk_cache=$HOME/ray-bazel-cache" >> $HOME/.bazelrc
fi

View file

@ -1,5 +0,0 @@
set -x
set -e
mkdir -p $HOME/ray-bazel-cache
echo "build --disk_cache=$HOME/ray-bazel-cache" >> .bazelrc