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>
This commit is contained in:
parent
01dfb65ee2
commit
d82c3cee02
|
@ -1,4 +1,5 @@
|
||||||
language: c
|
language: c
|
||||||
|
cache: ccache
|
||||||
dist: trusty
|
dist: trusty
|
||||||
services: docker
|
services: docker
|
||||||
|
|
||||||
|
@ -6,9 +7,9 @@ before_install:
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull anholt/xserver-travis ; fi
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull anholt/xserver-travis ; fi
|
||||||
|
|
||||||
before_script:
|
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 echo ADD . /root >> Dockerfile ; fi
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit . ; fi
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit . ; fi
|
||||||
|
|
||||||
script:
|
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
|
||||||
|
|
Loading…
Reference in New Issue