Skip to content

Commit

Permalink
[CI] Use gcovr instead of lcov for codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
aobolensk committed Jan 17, 2025
1 parent 9eafe5d commit 3f3467e
Showing 1 changed file with 15 additions and 9 deletions.
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

0 comments on commit 3f3467e

Please sign in to comment.