diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 32a304352..ff8e910a4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -652,8 +652,8 @@ jobs: shopt -s globstar # Update source code paths from macOS tracefiles to match Linux. sed -i -Ee 's|^SF:/Users|SF:/home|' artifacts/*.macos-*/**/coverage.info - # Update source code paths from Windows tracefiles to match Linux. - sed -i -Ee 's|\\|/|g' -e 's|^SF:D:/a|SF:/home/runner/work|' artifacts/*.win.*/**/coverage.info + # Update source code paths from Windows tracefiles to match Linux, and remove all \r chars from line endings. + sed -i -Ee 's|\r$||' -e 's|\\|/|g' -e 's|^SF:D:/a|SF:/home/runner/work|' artifacts/*.win.*/**/coverage.info # Combine all tracefiles into one. lcov $(find artifacts -name '*.info' -type f -printf '-a %p\n') -o coverage.info # Generate the HTML report. diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 9af0cec38..12a427044 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -64,6 +64,7 @@ if (ENABLE_COVERAGE AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info *:\\mingw32\\* --output-file coverage.info COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info *:\\mingw64\\* --output-file coverage.info COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info *\\.qt\\* --output-file coverage.info + COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info *\\.rcc\\* --output-file coverage.info COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info *\\moc_*.cpp --output-file coverage.info COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info *\\Qt\\* --output-file coverage.info COMMAND ${CODECOV_LCOV} --ignore-errors unused --remove coverage.info *\\test\\* --output-file coverage.info