From 0c4dd3c4013825d0021a5273d1104f090bcd76d4 Mon Sep 17 00:00:00 2001 From: Simon Mo Date: Sun, 30 Jun 2019 17:57:48 -0700 Subject: [PATCH] Use bazel disk cache with travis (#5068) --- .travis.yml | 5 +++++ ci/travis/setup-bazel-cache.sh | 5 +++++ 2 files changed, 10 insertions(+) create mode 100755 ci/travis/setup-bazel-cache.sh 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