File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ name : SonarQube
2+ on :
3+ push :
4+ branches :
5+ - 11.8-sonarqube
6+ pull_request :
7+ types : [opened, synchronize, reopened]
8+ jobs :
9+ build :
10+ name : Build and analyze
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+ with :
15+ path : src
16+ submodules : ' recursive'
17+ # fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
18+ - name : Create build directory
19+ run : mkdir build
20+ - name : Run CMake
21+ run : |
22+ docker run --rm \
23+ -v ${{ github.workspace }}/src:/src \
24+ -w /src \
25+ -v ${{ github.workspace }}/build:/build \
26+ --user root \
27+ quay.io/mariadb-foundation/bb-worker:ubuntu22.04 \
28+ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -B build -S src
29+ - name : SonarQube Scan
30+ uses : SonarSource/sonarqube-scan-action@v5.2.0
31+ env :
32+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
33+ with :
34+ args : >
35+ --define sonar.cfamily.compile-commands="build/compile_commands.json"
You can’t perform that action at this time.
0 commit comments