From 1f2c83db613329a9b3360c3246a3d779566fe06b Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Fri, 21 Feb 2020 15:23:22 +0100 Subject: [PATCH] travis: Enable caching for sonarcloud scan --- .travis.yml | 3 +++ scripts/test.sh | 2 ++ 2 files changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index c4df15257..c827f0217 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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" diff --git a/scripts/test.sh b/scripts/test.sh index 1ea8478f1..98731699e 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -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 ;;