Files
Sebastian Dine e5c830e945 minor: New Game Digimon Digi-Battle (#17)
* digimon digi battle added to supported games

* sonarqube update

* readme update

---------

Co-authored-by: sdine <sdine@sdine.com>
2026-07-19 12:06:57 +02:00

83 lines
2.4 KiB
YAML

name: Feature CI
on:
push:
branches-ignore:
- master
permissions:
contents: read
jobs:
sonarqube:
name: SonarQube Cloud scan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Compute Sonar project key
run: echo "SONAR_PROJECT_KEY=${GITHUB_REPOSITORY/\//_}" >> "$GITHUB_ENV"
- name: Install scan prerequisites
run: >
sudo apt-get update &&
sudo apt-get install -y
cmake
ninja-build
gcovr
pkg-config
libgtk-3-dev
libwxgtk3.2-dev
- name: Configure with coverage instrumentation
run: >
cmake -S . -B build -G Ninja
-DCMAKE_C_COMPILER=gcc
-DCMAKE_CXX_COMPILER=g++
-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/"
--exclude-directories "build/_deps"
--exclude "^tests/"
- name: SonarQube Cloud scan
uses: SonarSource/sonarqube-scan-action@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=${{ github.repository_owner }}
-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
-Dsonar.coverage.exclusions=**/ui_wx/**,**/app/**
-Dsonar.cpd.exclusions=**/ui_wx/src/*GameView.cpp,**/ui_wx/src/*CardEditDialog.cpp,**/ui_wx/src/*SelectedCardPanel.cpp
linux:
name: Linux build + tests
uses: ./.github/workflows/feature-linux.yml
windows:
name: Windows build + tests
uses: ./.github/workflows/feature-windows.yml