diff --git a/.travis.yml b/.travis.yml index e5631fd9f..ec02918ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -141,6 +141,7 @@ 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 @@ -214,3 +215,7 @@ deploy: on: repo: ray-project/ray condition: $LINUX_WHEELS = 1 || $MAC_WHEELS = 1 + +cache: + directories: + - $HOME/ray-bazel-cache diff --git a/ci/travis/setup-bazel-cache.sh b/ci/travis/setup-bazel-cache.sh new file mode 100755 index 000000000..c9e0bf42c --- /dev/null +++ b/ci/travis/setup-bazel-cache.sh @@ -0,0 +1,5 @@ +set -x +set -e + +mkdir -p $HOME/ray-bazel-cache +echo "build --disk_cache=$HOME/ray-bazel-cache" >> .bazelrc