diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 7602b2d..5147044 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -10,6 +10,10 @@ jobs: container: image: ghcr.io/${{ github.repository }}/linux-ci:latest steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: true - name: Install build wrapper run: | wget http://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip @@ -18,10 +22,6 @@ jobs: run: | wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-linux.zip unzip sonar-scanner-cli-4.6.2.2472-linux.zip - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: true - name: Build and scan run: ci/buildsonarcloud.sh env: diff --git a/ci/buildsonarcloud.sh b/ci/buildsonarcloud.sh index f542ce4..25a7731 100755 --- a/ci/buildsonarcloud.sh +++ b/ci/buildsonarcloud.sh @@ -36,7 +36,7 @@ cmake "$REPO_ROOT" -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON # Wraps the compilation with the Build Wrapper to generate configuration (used # later by the SonarQube Scanner) into the "bw-output" folder -/build-wrapper-linux-x86/build-wrapper-linux-x86-64 \ +"$REPO_ROOT"/build-wrapper-linux-x86/build-wrapper-linux-x86-64 \ --out-dir bw-output cmake \ --build . # Test project @@ -46,6 +46,6 @@ ctest -VV make gcov # Scan project -/sonar-scanner-4.6.2.2472-linux/bin/sonar-scanner -Dsonar.host.url=https://sonarcloud.io -Dproject.settings="$REPO_ROOT"/sonar-project.properties -Dsonar.projectBaseDir="$REPO_ROOT" -Dsonar.cfamily.gcov.reportsPath="$BUILD_DIR" +"$REPO_ROOT"/sonar-scanner-4.6.2.2472-linux/bin/sonar-scanner -Dsonar.host.url=https://sonarcloud.io -Dproject.settings="$REPO_ROOT"/sonar-project.properties -Dsonar.projectBaseDir="$REPO_ROOT" -Dsonar.cfamily.gcov.reportsPath="$BUILD_DIR"