Add CTest coverage reporting
Some checks failed
libakgl CI Build / cmake_build (push) Failing after 19s
libakgl CI Build / mutation_test (push) Failing after 16s

Instrument libakgl in opt-in coverage builds, use CTest fixtures to reset counters and emit Cobertura XML and detailed HTML reports, and upload those reports from Gitea CI. Document the local coverage workflow for contributors.

Co-authored-by: Codex (GPT-5) <noreply@openai.com>
This commit is contained in:
2026-07-30 01:25:26 -04:00
parent 549b27d3eb
commit ff88f48fa2
3 changed files with 60 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ jobs:
run: |
sudo apt-get update -y
sudo apt-get install -y \
cmake doxygen gcc pkg-config \
cmake doxygen gcc gcovr pkg-config \
libasound2-dev libfreetype-dev libharfbuzz-dev \
libpng-dev libtiff-dev libwebp-dev \
libudev-dev libx11-dev libxcursor-dev libxext-dev \
@@ -22,7 +22,9 @@ jobs:
libxss-dev libxtst-dev
- name: Configure and build
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Debug \
-DAKGL_COVERAGE=ON
cmake --build build --parallel
- name: Build API documentation
run: doxygen Doxyfile
@@ -43,6 +45,13 @@ jobs:
detailed_summary: true
include_passed: true
fail_on_failure: 'true'
- name: Upload coverage reports
if: always()
uses: actions/upload-artifact@v4
with:
name: code-coverage
path: build/coverage/
if-no-files-found: warn
mutation_test:
runs-on: ubuntu-latest