Skip to content

Commit b34c706

Browse files
Update build.yml
1 parent 3f78795 commit b34c706

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/build.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,24 @@ jobs:
2525
curl -L https://github.com/OpenCppCoverage/OpenCppCoverage/releases/download/release-0.9.9.0/OpenCppCoverageSetup-x64-0.9.9.0.exe -o OpenCppCoverageSetup.exe
2626
Start-Process -FilePath .\OpenCppCoverageSetup.exe -ArgumentList "/SUPRESSMSGBOXES /NORESTART /VERYSILENT" -NoNewWindow -Wait
2727
28-
- name: Install sonar-scanner and build-wrapper
29-
uses: sonarsource/sonarcloud-github-c-cpp@v3
28+
- name: Install Build Wrapper
29+
uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v4
3030

31-
- name: Run build-wrapper
31+
- name: Run Build Wrapper
3232
run: |
33-
build-wrapper-win-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} msbuild sonar_scanner_example.vcxproj /t:rebuild /nodeReuse:false
33+
build-wrapper-win-x86-64.exe --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} msbuild sonar_scanner_example.vcxproj /t:rebuild /nodeReuse:false
3434
- name: Build tests
3535
run: |
3636
msbuild test1\test1.vcxproj
3737
msbuild test2\test2.vcxproj
3838
- name: Run tests with coverage
3939
run: |
4040
&"C:\Program Files\OpenCppCoverage\OpenCppCoverage.exe" --cover_children --sources=$(pwd) --modules test*\*\test*.dll "--export_type=cobertura:cobertura.xml" -- vstest.console.exe test1\*\test1.dll test2\*\test2.dll
41-
- name: Run sonar-scanner
41+
- name: SonarQube Scan
42+
uses: SonarSource/sonarqube-scan-action@v4
4243
env:
43-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4444
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} # Put the name of your token here
45-
run: >
46-
sonar-scanner
47-
--define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
48-
--define sonar.cfamily.cobertura.reportPaths="cobertura.xml"
45+
with:
46+
args: >
47+
--define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
48+
--define sonar.cfamily.cobertura.reportPaths="cobertura.xml"

0 commit comments

Comments
 (0)