From d27017aca93cd5b3f2477c3688fb761f3f824e9b Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sun, 13 Oct 2024 11:28:56 -0400 Subject: [PATCH] ci(coverage): fix gcovr report generation (#36) --- .github/workflows/ci.yml | 5 +++++ CMakeLists.txt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9eaa651..a9d4233 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b3712b..cb263d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()