.travis.yml: Enable ccache on OSX
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Tue, 3 Sep 2019 13:26:45 +0000 (15:26 +0200)
committerAlex Bennée <alex.bennee@linaro.org>
Tue, 10 Sep 2019 13:14:32 +0000 (14:14 +0100)
By default, ccache is not installed on macOS environments.

See https://docs.travis-ci.com/user/caching/#ccache-on-macos

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
.travis.yml

index 7d6c63a28030c12839b5635837bbfa3917543d9e..3d1c7f0d7e05434a0bb423817228c7bfc3d09c85 100644 (file)
@@ -45,6 +45,7 @@ addons:
       - gcovr
   homebrew:
     packages:
+      - ccache
       - glib
       - pixman
       - gnu-sed
@@ -80,6 +81,7 @@ git:
 
 
 before_script:
+  - if [ "$TRAVIS_OS_NAME" == "osx" ] ; then export PATH="/usr/local/opt/ccache/libexec:$PATH" ; fi
   - command -v ccache && ccache --zero-stats
   - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
   - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; }