Skip to content

Commit d27017a

Browse files
ci(coverage): fix gcovr report generation (#36)
1 parent 768cfdd commit d27017a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,14 @@ jobs:
145145
--exclude-noncode-lines \
146146
--exclude-throw-branches \
147147
--exclude-unreachable-branches \
148+
--verbose \
148149
--xml-pretty \
149150
-o coverage.xml
150151
152+
- name: Debug coverage file
153+
run: |
154+
cat build/coverage.xml
155+
151156
- name: Set codecov flags
152157
id: codecov_flags
153158
run: |

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
115115
# Additional setup for coverage
116116
# https://gcovr.com/en/stable/guide/compiling.html#compiler-options
117117
#
118-
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
118+
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
119119
set(CMAKE_CXX_FLAGS "-fprofile-arcs -ftest-coverage -ggdb -O0")
120120
set(CMAKE_C_FLAGS "-fprofile-arcs -ftest-coverage -ggdb -O0")
121121
endif()

0 commit comments

Comments
 (0)