From 5c3c39143e381909307f6903f13774b275ed956d Mon Sep 17 00:00:00 2001 From: Vincenzo Pellegrini Date: Tue, 21 May 2024 11:17:10 +0200 Subject: [PATCH] CPP-5241 Migrate github action from build-wrapper-output to compilation-database (#54) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4cdf435..fd262b4 100644 --- a/README.md +++ b/README.md @@ -55,14 +55,14 @@ jobs: uses: sonarsource/sonarcloud-github-c-cpp@v2 - name: Run build-wrapper run: | - #here goes your compilation wrapped with build-wrapper; See https://docs.sonarcloud.io/advanced-setup/languages/c-c-objective-c/#analysis-steps-using-build-wrapper for more information + # here goes your compilation wrapped with build-wrapper; See https://docs.sonarcloud.io/advanced-setup/languages/c-c-objective-c/#analysis-steps-using-build-wrapper for more information # build-preparation steps # build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} build-command - name: Run sonar-scanner env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" #Consult https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/sonarscanner-cli/ for more information and options + run: sonar-scanner --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json" #Consult https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/sonarscanner-cli/ for more information and options ``` You can change the `build-wrapper` and `sonar-scanner` installation path by using the optional input `installation-path` like this: