diff options
author | Eric Anholt <eric@anholt.net> | 2017-06-01 13:59:54 -0700 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2017-06-13 10:38:39 -0400 |
commit | d82c3cee02a99cf7861d1effaa5c7d38683a7783 (patch) | |
tree | 148045bf305d1a79a69b2931badd6d7b8ed74925 /.travis.yml | |
parent | 01dfb65ee2e34148718d3f95dfd4629024edba84 (diff) |
travis: Enable ccache.
We bind-mount the cache directory into the container. Cuts build time
from about 4 minutes to 2.
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml index d7379ab78..00d7a485a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: c +cache: ccache dist: trusty services: docker @@ -6,9 +7,9 @@ before_install: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull anholt/xserver-travis ; fi before_script: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM anholt/xserver-travis:v3 > Dockerfile ; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM anholt/xserver-travis:v4 > Dockerfile ; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile ; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit . ; fi script: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && ./test/scripts/build-travis-deps.sh" ; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run --volume $HOME/.ccache:/root/.ccache withgit /bin/sh -c "cd /root && ./test/scripts/build-travis-deps.sh" ; fi |