Skip to content

Commit b137d59

Browse files
committed
sonarcube - fetch + clang/clang++ for no uninit hackery
1 parent a65f7dc commit b137d59

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
container:
13+
image: quay.io/mariadb-foundation/bb-worker:ubuntu24.04
14+
options: --user root --entrypoint /bin/bash
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
path: src
19+
submodules: 'recursive'
20+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
21+
- name: Create build directory
22+
run: mkdir build
23+
- name: Run CMake
24+
run: |
25+
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
26+
-DUPDATE_SUBMODULES=OFF \
27+
-DPLUGIN_{MROONGA,ROCKSDB,OQGRAPH,COLUMNSTORE}=NO \
28+
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
29+
-B build -S src
30+
- name: SonarQube Dependencies
31+
run: |
32+
apt-get update
33+
apt-get install -y unzip
34+
- name: SonarQube Scan
35+
uses: SonarSource/sonarqube-scan-action@v5.2.0
36+
env:
37+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
38+
with:
39+
args: >
40+
--define sonar.cfamily.compile-commands="build/compile_commands.json"
41+
--define sonar.projectKey=grooverdan_mariadb-server
42+
--define sonar.organization=grooverdan
43+
--define sonar.token=${SONAR_TOKEN}
44+
--define sonar.sources=src
45+
--define sonar.exclusions=storage/mroonga/**/*,storage/rocksdb/**/*,storage/oqgraph/**/*,storage/columnstore/**/*,**/*.java,mysql-test/std_data/**/*,scripts/**/*,**/*.sql

0 commit comments

Comments
 (0)