summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2018-09-24 14:31:52 -0700
committerBert Belder <bertbelder@gmail.com>2018-09-24 17:36:14 -0700
commitf42849744bbdd665008fdd7fd9a395659a23c802 (patch)
treefb806798f98226b8215734c2ea426d28c57256f9
parent1729bdb0d7f504436cacc07bedba642591fdb0cb (diff)
travis: save homebrew/ccache to cache, set ccache size to 1GB
-rw-r--r--.travis.yml27
1 files changed, 19 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml
index 3425198d4..2e1582d80 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,6 +9,7 @@ env:
global:
- CARGO_PATH=$HOME/.cargo/
- RUSTUP_PATH=$HOME/.rustup/
+ - HOMEBREW_PATH=$HOME/homebrew/
- DENO_BUILD_ARGS="use_custom_libcxx=false use_sysroot=false"
- DENO_BUILD_PATH=$HOME/out/Default
- DENO_BUILD_MODE=release
@@ -20,10 +21,28 @@ cache:
directories:
- "$CARGO_PATH"
- "$RUSTUP_PATH"
+ - "$HOMEBREW_PATH"
- third_party/v8/build/linux/debian_sid_amd64-sysroot/
- third_party/v8/third_party/llvm-build/
install:
- |-
+ # OS X: install a private copy of homebrew.
+ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
+ export BREW="${HOMEBREW_PATH}bin/brew"
+ export PATH="${HOMEBREW_PATH}bin:$PATH"
+ if [[ ! -x "$BREW" ]]; then
+ git clone git://github.com/homebrew/brew "$HOMEBREW_PATH"
+ fi
+ "$BREW" --version
+ fi
+- |-
+ # Install ccache (if necessary) and set it up.
+ if [[ "$TRAVIS_OS_NAME" == "osx" && ! $(which ccache) ]]; then
+ "$BREW" install ccache
+ fi
+ ccache --version | head -n 1
+ ccache --max-size=1G --show-stats
+- |-
# Install Rust.
# TODO(ry) Include rustc in third_party.
# https://github.com/denoland/deno/issues/386
@@ -40,15 +59,7 @@ install:
fi
hyperfine --version
fi
-- |-
- # Install ccache (OS X only).
- # TODO: Save ccache in the Travis CI cache.
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
- brew install ccache &&
- export PATH="/usr/local/opt/ccache/libexec:$PATH"
- fi
before_script:
-- ccache -s
- ./tools/setup.py
script:
- ./tools/lint.py