-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Use gcovr instead of lcov for codecov (#216)
- Loading branch information
Showing
1 changed file
with
15 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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: | ||
|