travis: Enable caching for sonarcloud scan

This commit is contained in:
Tobias Brunner 2020-02-21 15:23:22 +01:00
parent 96b61792df
commit 1f2c83db61
2 changed files with 5 additions and 0 deletions

View 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"

View File

@ -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
;;