fix: ci fix + code measurement reported (#5)

* patch: code coverage

* fix: ci fix
This commit is contained in:
Sebastian Dine
2026-05-09 15:01:22 +02:00
committed by GitHub
parent 108863b795
commit a691291413
3 changed files with 64 additions and 15 deletions
+18 -2
View File
@@ -27,17 +27,32 @@ jobs:
sudo apt-get install -y
cmake
ninja-build
gcovr
pkg-config
libgtk-3-dev
libwxgtk3.2-dev
- name: Generate compile commands
- name: Configure with coverage instrumentation
run: >
cmake -S . -B build -G Ninja
-DCCM_BUILD_TESTS=OFF
-DCCM_BUILD_TESTS=ON
-DCCM_USE_SYSTEM_WX=ON
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_C_FLAGS=--coverage
-DCMAKE_CXX_FLAGS=--coverage
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Build and run tests for coverage
run: >
cmake --build build --parallel &&
ctest --test-dir build --output-on-failure
- name: Generate Sonar coverage report
run: >
gcovr -r .
--sonarqube build/sonarqube-coverage.xml
--exclude "build/_deps/"
- name: SonarQube Cloud scan
uses: SonarSource/sonarqube-scan-action@v5
env:
@@ -50,6 +65,7 @@ jobs:
-Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }}
-Dsonar.sources=core,ui_wx,app
-Dsonar.cfamily.compile-commands=build/compile_commands.json
-Dsonar.coverageReportPaths=build/sonarqube-coverage.xml
linux:
name: Linux build + tests