diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index dd439dc..b42c801 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -47,17 +47,12 @@ jobs: - name: Install dependencies uses: ./.github/actions/install-dependencies - - name: Install sonar-scanner and build-wrapper - uses: SonarSource/sonarcloud-github-c-cpp@816b1822d71776ee0d32bc012e95024ec52ac1fc # v3.1.0 - - - name: Run build-wrapper - run: | - cmake -B build - build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build + - name: Generate compilation database + run: cmake -B build - name: Run sonar-scanner + uses: SonarSource/sonarqube-scan-action@bfd4e558cda28cda6b5defafb9232d191be8c203 # v4.2.1 + with: + args: --define sonar.cfamily.compile-commands=build/compile_commands.json env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: | - sonar-scanner --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"