Skip to content

Commit

Permalink
ci: switch to SonarSource/sonarqube-scan-action
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Feb 4, 2025
1 parent b09c912 commit 2b2c3a6
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,13 @@ jobs:

- name: Install dependencies
uses: ./.github/actions/install-dependencies

- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@44cc4d3d487fbc35e5c29b0a9d717be218d3a0e8 # v3.2.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"

0 comments on commit 2b2c3a6

Please sign in to comment.