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

[CI] Use gcovr instead of lcov for codecov #216

Merged
merged 1 commit into from
Jan 17, 2025
Merged
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
24 changes: 15 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ jobs:
sudo apt-get install mpich
sudo apt-get install libomp-dev
sudo apt-get install valgrind
sudo apt-get install gcovr lcov
sudo apt-get install gcovr
- name: CMake configure
run: >
cmake -S . -B build
Expand Down Expand Up @@ -927,20 +927,26 @@ jobs:
OMP_NUM_THREADS: 4
- name: Generate gcovr Coverage Data
run: |
mkdir cov-report
cd build
gcovr -r ../ --xml --output ../coverage.xml
gcovr -r ../ \
--exclude '.*3rdparty/.*' \
--exclude '/usr/.*' \
--exclude '.*/perf_tests/.*' \
--exclude '.*/func_tests/.*' \
--exclude '.*/all/runner.cpp' \
--exclude '.*/mpi/runner.cpp' \
--exclude '.*/omp/runner.cpp' \
--exclude '.*/seq/runner.cpp' \
--exclude '.*/stl/runner.cpp' \
--exclude '.*/tbb/runner.cpp' \
--xml --output ../coverage.xml \
--html=../cov-report/index.html --html-details
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: db9388ce-cf24-4840-b282-8e0070d8666f
files: coverage.xml
- name: Generate lcov Coverage Data
run: |
cd build
lcov --capture --directory . --output-file ../coverage.info
lcov --remove ../coverage.info '*/3rdparty/*' '/usr/*' '*/perf_tests/*' '*/func_tests/*' '*/all/runner.cpp' '*/mpi/runner.cpp' '*/omp/runner.cpp' '*/seq/runner.cpp' '*/stl/runner.cpp' '*/tbb/runner.cpp' --output-file ../coverage.info
cd ..
genhtml coverage.info --output-directory cov-report
- name: Upload coverage report artifact
uses: actions/upload-artifact@v4
with:
Expand Down
Loading