Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 Updated the code coverage config #562

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ jobs:
build_and_test:
strategy:
matrix:
os: [ ubuntu-22.04 ]
compiler: [ g++-11 ]
os: [ ubuntu-24.04 ]
compiler: [ g++-12 ]

name: Coverage on ${{matrix.os}} with ${{matrix.compiler}}
runs-on: ${{matrix.os}}

steps:
- name: Install the Compiler
run: sudo apt-get update && sudo apt-get install -yq ${{matrix.compiler}}
run: sudo apt-get update && sudo apt-get install -yq ${{matrix.compiler}} lcov

- name: Clone Repository
uses: actions/checkout@v4
Expand All @@ -68,6 +68,11 @@ jobs:
python-version: '3.13.x'
cache: 'pip'

- name: Setup gcovr
uses: BSFishy/pip-action@v1
with:
packages: gcovr

- name: Setup mold
uses: rui314/setup-mold@v1

Expand Down Expand Up @@ -118,9 +123,16 @@ jobs:

- name: Setup and run lcov
run: |
sudo apt-get install lcov
# Set gcov version matching the compiler version
gcovr --gcov-executable gcov-12 --gcov-ignore-parse-errors negative_hits.warn

# Capture coverage data
lcov -t "result" -o lcov.info -c -d ${{github.workspace}}/build/

# Filter coverage data for relevant paths
lcov -e lcov.info "${{github.workspace}}/include*" -o lcov_filtered.info

# Display filtered coverage data summary
lcov -l lcov_filtered.info

- name: Upload report to Codecov
Expand Down
Loading