travis: Enable caching for sonarcloud scan
authorTobias Brunner <tobias@strongswan.org>
Fri, 21 Feb 2020 14:23:22 +0000 (15:23 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 21 Feb 2020 15:11:44 +0000 (16:11 +0100)
.travis.yml
scripts/test.sh

index c4df152..c827f02 100644 (file)
@@ -41,6 +41,9 @@ jobs:
       if: type = push AND env(SONAR_TOKEN) IS present
       git:
         depth: false
+      cache:
+        directories:
+          - $HOME/.sonar-cache
       addons:
         sonarcloud:
           organization: "strongswan"
index 1ea8478..9873169 100755 (executable)
@@ -433,6 +433,8 @@ sonarcloud)
                -Dsonar.projectVersion=$(git describe)+${TRAVIS_BUILD_NUMBER} \
                -Dsonar.sources=. \
                -Dsonar.cfamily.threads=2 \
+               -Dsonar.cfamily.cache.enabled=true \
+               -Dsonar.cfamily.cache.path=$HOME/.sonar-cache \
                -Dsonar.cfamily.build-wrapper-output=bw-output || exit $?
        rm -r bw-output .scannerwork
        ;;