Skip to content

Commit 8cb364b

Browse files
committed
Fix sonar workflow
1 parent e4a74b8 commit 8cb364b

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

.github/workflows/sonarlint.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
on:
2-
# Trigger analysis when pushing in master or pull requests, and when creating
3-
# a pull request.
42
push:
53
branches:
64
- main
@@ -10,21 +8,18 @@ jobs:
108
sonarcloud:
119
runs-on: ubuntu-latest
1210
steps:
13-
- uses: actions/checkout@v3
11+
- uses: actions/checkout@v4
1412
with:
15-
# Disabling shallow clone is recommended for improving relevancy of reporting
1613
fetch-depth: 0
17-
- name: Install sonar-scanner and build-wrapper
18-
uses: sonarsource/sonarcloud-github-c-cpp@v2
19-
- name: Run build-wrapper
14+
- name: Build
2015
run: |
2116
mkdir build
2217
cd build
23-
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DCMAKE_CXX_STANDARD=17
24-
make -j
18+
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DCMAKE_CXX_STANDARD=17
19+
ninja
2520
cd ..
2621
- name: Run sonar-scanner
22+
uses: SonarSource/sonarqube-scan-action@v7
2723
env:
2824
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2925
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
30-
run: sonar-scanner

0 commit comments

Comments
 (0)