Align CI with CMake standards: dedicated build modes and matrix fixes#199
Conversation
📝 WalkthroughWalkthroughThese changes mark earliest compiler entries in Changes
Sequence Diagram(s)sequenceDiagram
participant MatrixGen as Matrix Generator
participant GH_Actions as GitHub Actions Matrix
participant Runner as Job Runner
participant Build as Build System (CMake/B2)
participant Tools as Post-build Tools (clang-tidy, FlameGraph, Coverage)
MatrixGen->>GH_Actions: emit matrix rows (time-trace, superproject-CMake, sanitizer, coverage, clang-tidy)
GH_Actions->>Runner: schedule job with matrix entry
Runner->>Build: checkout + (sparse-checkout if superproject?) + configure (CMake/B2)
alt superproject
Build->>Build: build within Boost superproject
else standalone
Build->>Build: build corosio-root with FetchContent deps
end
Build->>Tools: run tests, optionally emit compile_commands.json
opt clang-tidy
Tools->>Tools: run clang-tidy over corosio-root/__build__/compile_commands.json
end
opt time-trace / FlameGraph
Tools->>Tools: collect and process time-trace data -> FlameGraph
end
Tools->>Runner: upload coverage/artifacts (corosio-root/__build__/coverage.info)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 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://199.corosio.prtest3.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-03-11 18:01:51 UTC |
|
GCOVR code coverage report https://199.corosio.prtest3.cppalliance.org/gcovr/index.html Build time: 2026-03-11 18:12:47 UTC |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)
591-615:⚠️ Potential issue | 🟠 MajorEnable tests, examples, and perf explicitly in the standalone CMake lane.
Lines 607-614 never turn on
BOOST_COROSIO_BUILD_TESTS,BOOST_COROSIO_BUILD_EXAMPLES, orBOOST_COROSIO_BUILD_PERF. If any of those defaults is off, this job can go green without compiling the target categories issue#186asked CI to cover.Suggested change
extra-args: | -D Boost_VERBOSE=ON + -D BOOST_COROSIO_BUILD_TESTS=ON + -D BOOST_COROSIO_BUILD_EXAMPLES=ON + -D BOOST_COROSIO_BUILD_PERF=ON ${{ matrix.compiler == 'mingw' && '-D CMAKE_VERBOSE_MAKEFILE=ON' || '' }} ${{ contains(matrix.generator || '', 'Visual Studio') && format('-D CMAKE_CONFIGURATION_TYPES={0}', matrix.build-type) || '' }} ${{ env.CMAKE_WOLFSSL_INCLUDE && format('-D WolfSSL_INCLUDE_DIR={0}', env.CMAKE_WOLFSSL_INCLUDE) || '' }}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/ci.yml around lines 591 - 615, The CI workflow's CMake invocation (extra-args in the job) doesn't explicitly enable BOOST_COROSIO_BUILD_TESTS, BOOST_COROSIO_BUILD_EXAMPLES, or BOOST_COROSIO_BUILD_PERF, so add flags to the extra-args block to force them on (e.g. pass -D BOOST_COROSIO_BUILD_TESTS=ON, -D BOOST_COROSIO_BUILD_EXAMPLES=ON, -D BOOST_COROSIO_BUILD_PERF=ON) alongside the other -D options so the standalone CMake lane always builds tests, examples, and perf regardless of CMake defaults.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 112-117: The workflow installs the MSYS2 clang64 tree but leaves
environment/runtime variables and later Windows MinGW paths pointing to the
gcc/mingw toolchain, producing a mixed configuration; in the "Setup MSYS2 (MinGW
Clang)" step (matrix.compiler == 'mingw') update the environment and PATH to
finish the toolchain switch by exporting/setting cxx=clang++, cc=clang,
b2_toolset=clang (or equivalent CI env names used elsewhere) and replace later
references to mingw64 toolchain roots with the clang64 root (e.g., ensure
"C:/msys64/clang64/bin" is placed before any mingw64 paths and any uses of
g++/gcc are changed to clang++/clang for that matrix entry) so the job
consistently uses the clang64 toolchain.
- Around line 491-499: The CI job gated by matrix.superproject-cmake currently
restricts CMake to a single target via build-target: boost_corosio_tests which
prevents building the full superproject graph (libraries, TLS providers,
examples, benchmarks); remove or change the build-target key (or set it to a
full-build target such as ALL_BUILD or run with no build-target) in that job so
the CMake run using source-dir: boost-root and build-dir: __build_cmake_test__
builds the entire superproject matrix (ensuring generator, generator-toolset and
build-type still apply) and enable run-tests as needed to exercise the full
outputs.
- Around line 620-635: The clang-tidy configure job ("Configure for clang-tidy"
that uses alandefreitas/cpp-actions/cmake-workflow) only sets
CMAKE_EXPORT_COMPILE_COMMANDS but omits the dependency/vcpkg inputs used by the
standalone CMake build; update that job to pass the same dependency inputs (the
same WolfSSL/OpenSSL/vcpkg-related input keys used in the standalone build job)
and any related step outputs (e.g. vcpkg-root, vcpkg-triplet, wolfssl/openssl
version inputs or step outputs) so the configure-only run produces the same
target graph and can configure successfully; ensure the cc/cxx/generator/cxxstd
inputs remain identical to the standalone build so compile_commands.json matches
the real build.
---
Outside diff comments:
In @.github/workflows/ci.yml:
- Around line 591-615: The CI workflow's CMake invocation (extra-args in the
job) doesn't explicitly enable BOOST_COROSIO_BUILD_TESTS,
BOOST_COROSIO_BUILD_EXAMPLES, or BOOST_COROSIO_BUILD_PERF, so add flags to the
extra-args block to force them on (e.g. pass -D BOOST_COROSIO_BUILD_TESTS=ON, -D
BOOST_COROSIO_BUILD_EXAMPLES=ON, -D BOOST_COROSIO_BUILD_PERF=ON) alongside the
other -D options so the standalone CMake lane always builds tests, examples, and
perf regardless of CMake defaults.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: cc32f87e-2707-4006-a5d6-d8c05f1b6299
⛔ Files ignored due to path filters (2)
perf/bench/CMakeLists.txtis excluded by!**/bench/**test/cmake_test/CMakeLists.txtis excluded by!**/test/**
📒 Files selected for processing (3)
.fd.fxlcf.dpdns.orgpilers.json.github/generate-matrix.py.github/workflows/ci.yml
…cppalliance#186) Key changes: - Dedicate a single superproject-cmake matrix entry (GCC latest) for CMake superproject build and both integration tests, moving sparse checkout disable behind the superproject-cmake flag - Run standalone CMake from library root (corosio-root) instead of boost-root, building all targets without a build-target filter - Add clang-tidy as standalone configure-only step against corosio-root with version-parametric binary and include/src file filtering - Add FlameGraph compile-time profiling for Clang time-trace variant - Gate B2 on !coverage && !time-trace && !superproject-cmake && !clang-tidy - Gate standalone CMake on build-cmake || coverage - Add is_earliest to GCC 12, Clang 17, MSVC 14.34, Apple-Clang macos-14 so oldest compilers also run standalone CMake builds - Fix generate-matrix.py to emit generator-toolset (hyphen) matching ci.yml references, and read shared/vcpkg_triplet from compiler specs - Skip ASAN+UBSAN variant for MinGW (limited sanitizer support) - Restore zip/unzip/tar packages needed by vcpkg in container builds - Update cmake_test version range to 3.13...3.31
aab241c to
49e35ea
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
.github/generate-matrix.py (1)
93-99:⚠️ Potential issue | 🟡 MinorKeep the MinGW job label aligned with the compiler settings.
.fd.fxlcf.dpdns.orgpilers.jsonstill drives this family withg++/gccandb2_toolset: gcc, so renaming the lane toMinGW Clangwill make the matrix name misleading.Suggested fix
- "mingw": "MinGW Clang", + "mingw": "MinGW",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/generate-matrix.py around lines 93 - 99, The matrix entry in name_map for the mingw key is mislabeled as "MinGW Clang" which conflicts with .fd.fxlcf.dpdns.orgpilers.json that uses the gcc toolset; update the name_map dictionary so the "mingw" key maps to "MinGW" (e.g., change the value for the "mingw" entry in the name_map variable) to keep the generated job name aligned with the actual compiler settings.
🧹 Nitpick comments (1)
.github/generate-matrix.py (1)
277-280: Emit clang-tidy as an extra variant instead of rewriting the base Clang entry.Line 279 repurposes the base latest-Clang job into a configure-only clang-tidy lane. That drops the plain x86_64 latest-Clang entry from the matrix and leaves only special-purpose variants behind.
Suggested fix
# Base entry (x86_64 / default arch) base = make_entry(family, spec) - if spec.get("clang_tidy"): - apply_clang_tidy(base, spec) matrix.append(base) + if spec.get("clang_tidy"): + matrix.append(apply_clang_tidy(base.copy(), spec))🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/generate-matrix.py around lines 277 - 280, The current loop uses make_entry(...) to build base and then calls apply_clang_tidy(base, spec) which mutates and replaces the original latest-Clang job; instead, preserve the plain Clang entry and emit an additional clang-tidy variant: create base = make_entry(family, spec) and always append it to matrix, then if spec.get("clang_tidy") create a separate copy/variant (e.g., tidy_entry = make_entry(family, spec) or clone base) and call apply_clang_tidy(tidy_entry, spec) and append tidy_entry to matrix so both the standard x86_64 latest-Clang job and the clang-tidy lane exist.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In @.github/generate-matrix.py:
- Around line 93-99: The matrix entry in name_map for the mingw key is
mislabeled as "MinGW Clang" which conflicts with .fd.fxlcf.dpdns.orgpilers.json that
uses the gcc toolset; update the name_map dictionary so the "mingw" key maps to
"MinGW" (e.g., change the value for the "mingw" entry in the name_map variable)
to keep the generated job name aligned with the actual compiler settings.
---
Nitpick comments:
In @.github/generate-matrix.py:
- Around line 277-280: The current loop uses make_entry(...) to build base and
then calls apply_clang_tidy(base, spec) which mutates and replaces the original
latest-Clang job; instead, preserve the plain Clang entry and emit an additional
clang-tidy variant: create base = make_entry(family, spec) and always append it
to matrix, then if spec.get("clang_tidy") create a separate copy/variant (e.g.,
tidy_entry = make_entry(family, spec) or clone base) and call
apply_clang_tidy(tidy_entry, spec) and append tidy_entry to matrix so both the
standard x86_64 latest-Clang job and the clang-tidy lane exist.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 868594f3-8d78-4654-916d-bcedea86512e
⛔ Files ignored due to path filters (2)
perf/bench/CMakeLists.txtis excluded by!**/bench/**test/cmake_test/CMakeLists.txtis excluded by!**/test/**
📒 Files selected for processing (3)
.fd.fxlcf.dpdns.orgpilers.json.github/generate-matrix.py.github/workflows/ci.yml
Closes #186
Key changes:
Summary by CodeRabbit