diff options
| -rw-r--r-- | .gitlab-ci.yml | 10 | ||||
| -rw-r--r-- | .lcovrc | 4 | ||||
| -rw-r--r-- | CMakePresets.json | 2 | ||||
| -rw-r--r-- | cmake/Modules/EnableCoverage.cmake | 4 |
4 files changed, 7 insertions, 13 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index faea96e..e13c26c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,23 +33,21 @@ build-and-test: parallel: matrix: - BUILD_TYPE: - - Debug + - RelWithDebInfo - MinSizeRel coverage: stage: coverage script: - - lcov -c -o coverage.info -d build -b . --config-file .lcovrc - - lcov -l coverage.info - - genhtml -o coverage coverage.info + - lcov --config-file .lcovrc --capture --directory $(pwd) --output-file coverage.info + - lcov --config-file .lcovrc --list coverage.info coverage: '/Total:\|(\d+\.?\d+)\%/' artifacts: paths: - - coverage/* - coverage.info expire_in: 24 hours needs: - job: build-and-test parallel: matrix: - - BUILD_TYPE: Debug + - BUILD_TYPE: RelWithDebInfo @@ -1,10 +1,6 @@ # SPDX-FileCopyrightText: 2025 Felix Morgner <felix.morgner@gmail.com> # SPDX-License-Identifier: CC0-1.0 -#lcov -c -o cov.info -d build -b . - exclude = /usr/include/* -exclude = build/_deps/* -exclude = build/deps/* ignore_errors = unused,empty,inconsistent
\ No newline at end of file diff --git a/CMakePresets.json b/CMakePresets.json index d862f83..bbe76d1 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -6,7 +6,7 @@ "generator": "Ninja Multi-Config", "binaryDir": "${sourceDir}/build", "cacheVariables": { - "CMAKE_CONFIGURATION_TYPES": "Debug;MinSizeRel" + "CMAKE_CONFIGURATION_TYPES": "RelWithDebInfo;MinSizeRel" } }, { diff --git a/cmake/Modules/EnableCoverage.cmake b/cmake/Modules/EnableCoverage.cmake index dcf6c5f..411b7c6 100644 --- a/cmake/Modules/EnableCoverage.cmake +++ b/cmake/Modules/EnableCoverage.cmake @@ -3,8 +3,8 @@ function(enable_coverage TARGET) target_compile_options("${TARGET}" PRIVATE - "$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:-fcondition-coverage>" - "$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:--coverage>" + "$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:RelWithDebInfo>>:-fcondition-coverage>" + "$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:RelWithDebInfo>>:--coverage>" ) target_link_libraries("${TARGET}" PRIVATE "gcov" |
