Skip to content

Comments

Add Windows and macOS to coverage bot#172

Merged
mvandeberg merged 1 commit intocppalliance:developfrom
mvandeberg:pr/win-mac-coverage-bot
Feb 24, 2026
Merged

Add Windows and macOS to coverage bot#172
mvandeberg merged 1 commit intocppalliance:developfrom
mvandeberg:pr/win-mac-coverage-bot

Conversation

@mvandeberg
Copy link
Contributor

@mvandeberg mvandeberg commented Feb 24, 2026

Summary by CodeRabbit

  • Chores
    • Enhanced coverage infrastructure with explicit per-platform support for Windows (MinGW), multiple macOS variants, and Linux (GCC 13), including platform-specific coverage flags.
    • Added platform-specific coverage report generation and improved upload handling to Codecov with propagated flags.
    • Expanded ignored paths to exclude additional build and test directories and clarified per-platform path interpretations.

@mvandeberg mvandeberg changed the title Pr/win mac coverage bot Add Windows and macOS to coverage bot Feb 24, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 24, 2026

📝 Walkthrough

Walkthrough

Updates 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

Cohort / File(s) Summary
Codecov configuration
​.codecov.yml
Added per-platform flags (linux, macos, windows) with platform-specific include/src paths and carryforward; increased after_n_builds to 3; added libs/corosio/:: fixes entry; set project and patch status to informational; expanded ignore with extra/ and test/.
CI workflow configuration
.github/workflows/ci.yml
Added Windows MinGW coverage job and multiple macOS Apple-Clang variants; added Linux GCC 13 coverage job; introduced matrix coverage-flag propagation; added platform-specific coverage report generation steps (Linux/macOS/Windows) using gcovr/lcov tooling and conditional Codecov upload flags.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰
I hopped through jobs on Linux, Mac, and Win,
Lined up flags, paths, and the coverage bin,
Reports collected from each little nook,
I bounced them to Codecov — take a look! 🎉

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add Windows and macOS to coverage bot' directly and accurately reflects the main changes in the pull request, which add Windows and macOS platform support to the coverage configuration.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cppalliance-bot
Copy link

cppalliance-bot commented Feb 24, 2026

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
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.26%. Comparing base (c0ae39b) to head (2b60c1f).

❗ There is a different number of reports uploaded between BASE (c0ae39b) and HEAD (2b60c1f). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (c0ae39b) HEAD (2b60c1f)
1 0
Additional details and impacted files

Impacted file tree graph

@@             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     
Flag Coverage Δ
linux 82.24% <ø> (?)
macos 65.18% <ø> (?)
windows 67.61% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 78 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c0ae39b...2b60c1f. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cppalliance-bot
Copy link

cppalliance-bot commented Feb 24, 2026

GCOVR code coverage report https://172.corosio.prtest3.cppalliance.org/gcovr/index.html
LCOV code coverage report https://172.corosio.prtest3.cppalliance.org/genhtml/index.html
Coverage Diff Report https://172.corosio.prtest3.cppalliance.org/diff-report/index.html

Build time: 2026-02-24 16:29:57 UTC

@mvandeberg mvandeberg force-pushed the pr/win-mac-coverage-bot branch from 2b60c1f to d4a13a6 Compare February 24, 2026 16:19
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (4)
.github/workflows/ci.yml (3)

964-965: gcovr installed 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.2

Also 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-executable not specified for Windows — prone to picking up the wrong gcov from PATH.

On windows-2022 runners, multiple gcov-compatible binaries exist in PATH (e.g., Strawberry Perl's /c/Strawberry/c/bin/gcov.exe, Git-bundled tools). Although setup-cpp prepends 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 uses xcrun 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-major is 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: --coverage makes -fprofile-arcs -ftest-coverage redundant.

--coverage is the GCC shorthand that already expands to -fprofile-arcs -ftest-coverage. The two flags are repeated in both cxxflags and ccflags. 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: true on 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.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2b60c1f and d4a13a6.

📒 Files selected for processing (2)
  • .codecov.yml
  • .github/workflows/ci.yml

@mvandeberg mvandeberg merged commit fbb82bc into cppalliance:develop Feb 24, 2026
20 checks passed
@mvandeberg mvandeberg deleted the pr/win-mac-coverage-bot branch February 24, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants