From 26dfa287f91d355dfa61b015a9b3308e55994206 Mon Sep 17 00:00:00 2001 From: elsid Date: Sat, 29 Sep 2018 15:15:15 +0300 Subject: [PATCH] Use ccache for linux CI build --- .travis.yml | 6 +++++- CI/before_script.linux.sh | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 51b1720c4..d87b0f01c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,10 @@ env: # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created # via the "travis encrypt" command using the project repo's public key - secure: "jybGzAdUbqt9vWR/GEnRd96BgAi/7Zd1+2HK68j/i/8+/1YH2XxLOy4Jv/DUBhBlJIkxs/Xv8dRcUlFOclZDHX1d/9Qnsqd3oUVkD7k1y7cTOWy9TBQaE/v/kZo3LpzA3xPwwthrb0BvqIbOfIELi5fS5s8ba85WFRg3AX70wWE=" +cache: + ccache: true + directories: + - ${HOME}/.ccache addons: apt: sources: @@ -17,7 +21,7 @@ addons: - llvm-toolchain-xenial-7 packages: [ # Dev - cmake, clang-7, clang-tools-7, gcc-8, g++-8, + cmake, clang-7, clang-tools-7, gcc-8, g++-8, ccache, # Boost libboost-filesystem-dev, libboost-iostreams-dev, libboost-program-options-dev, libboost-system-dev, # FFmpeg diff --git a/CI/before_script.linux.sh b/CI/before_script.linux.sh index 3ce005874..250955e49 100755 --- a/CI/before_script.linux.sh +++ b/CI/before_script.linux.sh @@ -14,6 +14,10 @@ if [[ -z "${BUILD_OPENMW}" ]]; then export BUILD_OPENMW=ON; fi if [[ -z "${BUILD_OPENMW_CS}" ]]; then export BUILD_OPENMW_CS=ON; fi ${ANALYZE} cmake \ + -DCMAKE_C_COMPILER="${CC}" \ + -DCMAKE_CXX_COMPILER="${CXX}" \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DBUILD_OPENMW=${BUILD_OPENMW} \ -DBUILD_OPENCS=${BUILD_OPENMW_CS} \ -DBUILD_LAUNCHER=${BUILD_OPENMW_CS} \