Add Windows and macOS to coverage bot#172
Conversation
📝 WalkthroughWalkthroughUpdates to CI and Codecov configuration add per-platform coverage builds (Linux, macOS, Windows), platform-specific include/src paths and flags, expanded ignore patterns, adjusted fixes entries, and platform-targeted coverage-report generation and upload steps in GitHub Actions. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
An automated preview of the documentation is available at https://172.corosio.prtest3.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-02-24 16:25:50 UTC |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## develop #172 +/- ##
===========================================
- Coverage 82.02% 75.26% -6.77%
===========================================
Files 70 88 +18
Lines 5876 10324 +4448
Branches 0 2375 +2375
===========================================
+ Hits 4820 7770 +2950
- Misses 1056 1824 +768
- Partials 0 730 +730
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
GCOVR code coverage report https://172.corosio.prtest3.cppalliance.org/gcovr/index.html Build time: 2026-02-24 16:29:57 UTC |
2b60c1f to
d4a13a6
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (4)
.github/workflows/ci.yml (3)
964-965:gcovrinstalled without a pinned version — reproducibility risk.Both the macOS step (
pip3 install --break-system-packages gcovr) and the Windows step (pip3 install gcovr) install whatever the latest gcovr release is at run time. A gcovr release with a breaking change in output format or CLI flags could silently break coverage reporting without any change to the workflow.Consider pinning to a specific version:
- pip3 install --break-system-packages gcovr + pip3 install --break-system-packages gcovr==7.2- pip3 install gcovr + pip3 install gcovr==7.2Also applies to: 976-976
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/ci.yml around lines 964 - 965, Pin the gcovr installs to a specific, tested version instead of installing the latest; update both occurrences of the pip install command (the macOS step currently running "pip3 install --break-system-packages gcovr" and the Windows step "pip3 install gcovr") to use a fixed version specifier (e.g., "gcovr==X.Y.Z") or reference a single GCOVR_VERSION variable used in both places so CI reproducibly installs the same gcovr release.
972-981:--gcov-executablenot specified for Windows — prone to picking up the wronggcovfrom PATH.On
windows-2022runners, multiplegcov-compatible binaries exist in PATH (e.g., Strawberry Perl's/c/Strawberry/c/bin/gcov.exe, Git-bundled tools). Althoughsetup-cppprepends MinGW's bin directory to PATH, relying on PATH ordering is fragile. The Linux step explicitly detects the versioned gcov (gcov-13), and the macOS step explicitly usesxcrun llvm-cov gcov. The Windows step should be equally explicit.🔧 Proposed fix
- name: Generate Coverage Report (Windows) if: ${{ matrix.coverage && matrix.windows }} run: | set -x pip3 install gcovr gcovr \ + --gcov-executable gcov \ -r boost-root \ --filter ".*/libs/${{steps.patch.outputs.module}}/include/.*" \ --filter ".*/libs/${{steps.patch.outputs.module}}/src/.*" \ --lcov -o "boost-root/__build_cmake_test__/coverage.info"If the exact MinGW gcov binary name needs to be discovered dynamically (similar to the Linux step),
steps.setup-cpp.outputs.version-majoris available:+ gcov_tool="gcov" + if command -v "gcov-${{ steps.setup-cpp.outputs.version-major }}" &> /dev/null; then + gcov_tool="gcov-${{ steps.setup-cpp.outputs.version-major }}" + fi gcovr \ - -r boost-root \ + --gcov-executable "${gcov_tool}" \ + -r boost-root \🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/ci.yml around lines 972 - 981, The Windows coverage step "Generate Coverage Report (Windows)" is brittle because gcovr can pick up the wrong gcov from PATH; update that step to pass --gcov-executable to gcovr pointing explicitly to the MinGW gcov binary (derive the binary name using steps.setup-cpp.outputs.version-major, e.g. gcov-${{steps.setup-cpp.outputs.version-major}} or the appropriate MinGW/LLVM wrapper) so gcovr uses the exact gcov intended; keep the existing filters and output file but add the --gcov-executable argument to the gcovr invocation in that step.
111-128:--coveragemakes-fprofile-arcs -ftest-coverageredundant.
--coverageis the GCC shorthand that already expands to-fprofile-arcs -ftest-coverage. The two flags are repeated in bothcxxflagsandccflags. This is harmless (and consistent with the existing Linux entry at line 261), but worth cleaning up for clarity.♻️ Proposed cleanup
- cxxflags: "--coverage -fprofile-arcs -ftest-coverage -fprofile-update=atomic" - ccflags: "--coverage -fprofile-arcs -ftest-coverage -fprofile-update=atomic" + cxxflags: "--coverage -fprofile-update=atomic" + ccflags: "--coverage -fprofile-update=atomic"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/ci.yml around lines 111 - 128, The MinGW job named "MinGW: C++20 (coverage)" redundantly specifies -fprofile-arcs and -ftest-coverage alongside the shorthand --coverage in both cxxflags and ccflags; remove the explicit -fprofile-arcs and -ftest-coverage tokens from the cxxflags and ccflags values and keep just --coverage (and any other flags like -fprofile-update=atomic) so the flags are not duplicated..codecov.yml (1)
35-51:carryforward: trueon all platforms will silently substitute stale data when a coverage build fails.With
carryforward: true, if no report is uploaded for a flag, Codecov reaches back to the previous commit to carry forward coverage — those files will have coverage information equivalent to the prior commit. This means a broken Windows or macOS coverage build that never reaches the upload step (e.g., a compile error) will not cause a coverage regression in the Codecov report; it will silently reuse old data.This is the intended trade-off for cross-platform builds that don't all run on every commit, but be aware that a persistently failing platform build could go unnoticed from a coverage perspective.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.codecov.yml around lines 35 - 51, The per-platform config uses carryforward: true under the flags linux/macos/windows entries which causes stale coverage to be reused when a platform upload is missing; change the carryforward setting to false (or remove the carryforward key) for the macos and windows flag entries (or any platform you want to fail on missing uploads) so Codecov will not silently carry forward previous reports; update the flags block (linux, macos, windows) to reflect the new carryforward=false behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.codecov.yml:
- Around line 35-51: The per-platform config uses carryforward: true under the
flags linux/macos/windows entries which causes stale coverage to be reused when
a platform upload is missing; change the carryforward setting to false (or
remove the carryforward key) for the macos and windows flag entries (or any
platform you want to fail on missing uploads) so Codecov will not silently carry
forward previous reports; update the flags block (linux, macos, windows) to
reflect the new carryforward=false behavior.
In @.github/workflows/ci.yml:
- Around line 964-965: Pin the gcovr installs to a specific, tested version
instead of installing the latest; update both occurrences of the pip install
command (the macOS step currently running "pip3 install --break-system-packages
gcovr" and the Windows step "pip3 install gcovr") to use a fixed version
specifier (e.g., "gcovr==X.Y.Z") or reference a single GCOVR_VERSION variable
used in both places so CI reproducibly installs the same gcovr release.
- Around line 972-981: The Windows coverage step "Generate Coverage Report
(Windows)" is brittle because gcovr can pick up the wrong gcov from PATH; update
that step to pass --gcov-executable to gcovr pointing explicitly to the MinGW
gcov binary (derive the binary name using steps.setup-cpp.outputs.version-major,
e.g. gcov-${{steps.setup-cpp.outputs.version-major}} or the appropriate
MinGW/LLVM wrapper) so gcovr uses the exact gcov intended; keep the existing
filters and output file but add the --gcov-executable argument to the gcovr
invocation in that step.
- Around line 111-128: The MinGW job named "MinGW: C++20 (coverage)" redundantly
specifies -fprofile-arcs and -ftest-coverage alongside the shorthand --coverage
in both cxxflags and ccflags; remove the explicit -fprofile-arcs and
-ftest-coverage tokens from the cxxflags and ccflags values and keep just
--coverage (and any other flags like -fprofile-update=atomic) so the flags are
not duplicated.
Summary by CodeRabbit