44 push :
55 branches :
66 - master
7+ - release/**
78 paths-ignore :
89 - ' .azure/**'
910 - ' .circleci/**'
2526name : SonarCloud Workflow
2627jobs :
2728 sonarcloud :
28- runs-on : ubuntu-22 .04
29+ runs-on : ubuntu-24 .04
2930 steps :
3031 - uses : actions/checkout@v6
3132 with :
3233 # Disabling shallow clone is recommended for improving relevancy of reporting
3334 fetch-depth : 0
3435 submodules : recursive
3536
36-
37- - name : Add apt-get repositories
38- run : |
39- sudo add-apt-repository ppa:ubuntu-toolchain-r/test
40-
4137 - name : Update apt
4238 run : sudo apt-get update -y
4339
@@ -51,24 +47,14 @@ jobs:
5147 cmake -E make_directory ${{github.workspace}}/build
5248 echo $PATH
5349
54- - name : Get Sonar Build Wrapper
55- shell : bash
56- working-directory : ${{github.workspace}}/build
57- run : |
58- set -ex
59- wget https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
60- unzip build-wrapper-linux-x86.zip
61- mv build-wrapper-linux-x86/* .
62-
50+ - name : Install Build Wrapper
51+ uses : SonarSource/sonarqube-scan-action/install-build-wrapper@v7
52+
6353 - name : Configure CMake
6454 # Use a bash shell so we can use the same syntax for environment variable
6555 # access regardless of the host operating system
6656 shell : bash
67- working-directory : ${{github.workspace}}/build
68- run : cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -Werror=dev -Denable-portaudio=1 -Denable-ladspa=1 -Denable-coverage=1 -DNO_GUI=1 $GITHUB_WORKSPACE
69-
70- - name : Install sonar-scanner and build-wrapper
71- uses : SonarSource/sonarcloud-github-c-cpp@v2
57+ run : cmake -S . -B build -DCMAKE_BUILD_TYPE=$BUILD_TYPE -Werror=dev -Denable-portaudio=1 -Denable-ladspa=1 -Denable-coverage=1 -DNO_GUI=1 $GITHUB_WORKSPACE
7258
7359 - name : Build
7460 working-directory : ${{github.workspace}}/build
@@ -89,16 +75,12 @@ jobs:
8975 run : |
9076 rm -rf ${{ github.workspace }}/sf2
9177 gcovr --version
92- gcovr --help
93- ls -la ${{ github.workspace }}
94- ls -la ${{ github.workspace }}/build
95- ls -la ${{ github.workspace }}/build/coverage
9678
97- - name : Run sonar-scanner
79+ - name : SonarQube Scan
80+ uses : SonarSource/sonarqube-scan-action@v7
9881 env :
99- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
10082 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
101- run : |
102- sonar-scanner \
103- -Dsonar.cfamily.build-wrapper-output="${{github.workspace}}/ build/${{ env.BUILD_WRAPPER_OUT_DIR }}" \
83+ with :
84+ args : >
85+ -Dsonar.cfamily.build-wrapper-output=build/${{ env.BUILD_WRAPPER_OUT_DIR }}
10486 -Dsonar.coverageReportPaths=${{github.workspace}}/build/coverage/sonarqube.report
0 commit comments