Travis speed-ups (#3432)

* Enable ccache
* Cache mingw dependencies
* Expose USE_CCACHE option
* Disable ccache for release builds
This commit is contained in:
Lukas W
2017-03-22 11:28:08 +01:00
committed by GitHub
parent 31ade1ad2c
commit 8c3f442322
10 changed files with 77 additions and 22 deletions

View File

@@ -2,6 +2,10 @@ language: cpp
compiler: gcc
dist: trusty
sudo: required
cache:
directories:
- apt_mingw_cache
- $HOME/.ccache
matrix:
include:
- env: TARGET_OS=win32
@@ -19,10 +23,14 @@ install:
- . ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.install.sh
before_script:
- mkdir build && cd build
- export CMAKE_FLAGS="-DWANT_QT5=$QT5 -DUSE_WERROR=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo"
- if [ -z "$TRAVIS_TAG" ]; then export CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_CCACHE=ON"; fi
script:
- . ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.script.sh
- make -j4
- if [[ $TARGET_OS != win* ]]; then make tests && ./tests/tests; fi;
after_script:
- ccache -s
before_deploy: make package
deploy:
provider: releases