Skip to content

Commit

Permalink
ci(coverage): fix gcovr report generation (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher authored Oct 13, 2024
1 parent 768cfdd commit d27017a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,14 @@ jobs:
--exclude-noncode-lines \
--exclude-throw-branches \
--exclude-unreachable-branches \
--verbose \
--xml-pretty \
-o coverage.xml
- name: Debug coverage file
run: |
cat build/coverage.xml
- name: Set codecov flags
id: codecov_flags
run: |
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
# Additional setup for coverage
# https://gcovr.com/en/stable/guide/compiling.html#compiler-options
#
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(CMAKE_CXX_FLAGS "-fprofile-arcs -ftest-coverage -ggdb -O0")
set(CMAKE_C_FLAGS "-fprofile-arcs -ftest-coverage -ggdb -O0")
endif()
Expand Down

0 comments on commit d27017a

Please sign in to comment.