Skip to content

Commit e23f392

Browse files
committed
Use gcov instead of kcov for CI coverage
1 parent 34ae8cd commit e23f392

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
-B build \
5959
-DCMAKE_CXX_COMPILER=${{matrix.config.cxx}} \
6060
-DCMAKE_CXX_STANDARD=${{matrix.config.std}} \
61-
-DCMAKE_CXX_FLAGS="${STDLIB} -Wall -Wextra -Wconversion -pedantic -Werror" \
61+
-DCMAKE_CXX_FLAGS="${STDLIB} -Wall -Wextra -Wconversion -pedantic -Werror --coverage" \
6262
-DCMAKE_PREFIX_PATH="${LIBRARY_PREFIX}" \
6363
-DCMAKE_BUILD_TYPE=Debug
6464
- name: "build"
@@ -73,15 +73,14 @@ jobs:
7373
7474
- name: "collect coverage"
7575
run: |
76-
kcov --skip-solibs ./coverage --include-pattern=strong_type.hpp ./build/self_test || true
77-
kcov --skip-solibs ./coverage --include-pattern=strong_type.hpp ./build/test_fmt8/test_fmt8 || true
78-
kcov --skip-solibs ./coverage --include-pattern=strong_type.hpp ./build/test_fmt9/test_fmt9 || true
76+
COV=`echo ${{matrix.config.cxx}} | grep -q clang && echo "llvm-cov gcov"|| echo gcov`
77+
echo ${COV} -abcfu `find . -name "test*.gcno"`
78+
${COV} -abcfu `find . -name "test*.gcno"`
7979
8080
- name: "upload coverage"
8181
uses: codecov/codecov-action@v3
8282
with:
83-
directory: coverage
84-
files: "*test*/cobertura.xml"
83+
files: "strong_type.hpp.gcov"
8584
name: "Linux ${{matrix.config.cxx}} C++${{matrix.config.std}} ${{matrix.config.stdlib}}"
8685
fail_ci_if_error: false
8786
verbose: true

0 commit comments

Comments
 (0)