Skip to content

Commit

Permalink
try gcovr
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiud committed Oct 6, 2023
1 parent 6226706 commit 25e8302
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ jobs:

- name: Setup Dependencies
run: |
brew install lcov ninja
brew install ninja
- name: Setup Dependencies
if: matrix.build_type == 'Debug'
run: |
brew install gcovr
- name: Setup Environment
if: matrix.build_type == 'Debug'
Expand Down Expand Up @@ -53,21 +58,8 @@ jobs:
- name: Generate Coverage
if: matrix.build_type == 'Debug'
run: |
lcov --ignore-errors inconsistent --directory . --capture --output-file coverage.info
lcov --remove coverage.info \
'*/src/*_unittest.cc' \
'*/src/googletest.h' \
'*/src/mock-log.h' \
'*/usr/*' \
--output-file coverage.info
for file in src/glog/*.h.in; do
name=$(basename ${file})
name_we=${name%.h.in}
sed -i "" "s|${{github.workspace}}/glog/${name_we}.h\$|${file}|g" coverage.info
done
lcov --list coverage.info
cd build_${{matrix.build_type}}
gcovr -r .. --filter ../src/ . -o coverage.xml
- name: Upload Coverage to Codecov
if: matrix.build_type == 'Debug'
Expand Down

0 comments on commit 25e8302

Please sign in to comment.