Skip to content

Commit

Permalink
Use gcov for coverage in CI rather that kcov
Browse files Browse the repository at this point in the history
  • Loading branch information
rollbear committed Nov 3, 2023
1 parent 13b6433 commit b875b3a
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1572,6 +1572,8 @@ jobs:
then
cxx_flags="${cxx_flags} -fno-omit-frame-pointer"
fi
echo ${{ matrix.config.name }} | grep -q -e '^Windows" || cxx_flags="${cxx_flags} --coverage"
cmake \
-S . \
-B build \
Expand All @@ -1598,17 +1600,18 @@ jobs:
./build/test/self_test
- name: Collect coverage
if: (startsWith(matrix.config.name, 'Linux'))
shell: bash
if: (!startsWith(matrix.config.name, 'windows'))
run: |
kcov --skip-solibs --include-pattern=trompeloeil.hpp ./coverage ./build/test/self_test || true
COV=`echo "${{ matrix.config.name }}}" | grep -q -e "Linux.*Clang" && echo "llvm-cov gcov"|| echo gcov`
${COV} -abcfup `find build/test -name "*.gcno"`
ls *.gcov| grep -v 'include#trompeloeil'|xargs rm
- name: Upload coverage
if: startsWith(matrix.config.name, 'Linux') && github.repository == 'rollbear/trompeloeil'
if: (!startsWith(matrix.config.name, 'windows')) && github.repository == 'rollbear/trompeloeil'
uses: codecov/codecov-action@v3
with:
directory: coverage
files: self_test*/cobertura.xml
name: ${{ matrix.config.name }}
gcov_include: "include/trompeloeil"
name: "${{ matrix.config.name }}"
fail_ci_if_error: false
verbose: true

0 comments on commit b875b3a

Please sign in to comment.