Skip to content

[CMake 7/7] Add CMake builds and migrate the test runner and CI - #3506

Draft
SteveBronder wants to merge 1 commit into
fix/cvodes-adjoint-quadrature-outputfrom
cmake-split/06-cmake
Draft

SteveBronder wants to merge 1 commit into
fix/cvodes-adjoint-quadrature-outputfrom
cmake-split/06-cmake

Conversation

@SteveBronder

@SteveBronder SteveBronder commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Add CMake builds for vendored dependencies, individual and grouped test executables, precompiled headers, standalone header checks, and generated probability/expression tests. Switch runTests.py, its Python build tools, Jenkins, and GitHub workflows together, and document the configuration/cache workflow. Keep Makefiles for upstream consumers. Clang test targets suppress unused-lambda-capture diagnostics so autodiff callbacks retain explicit captures.

Part 7 of the CMake migration split from #3463.

Depends on #3501, #3502, #3503, #3504, #3505. Also depends on #3508. Its base is fix/cvodes-adjoint-quadrature-output, so this review contains only the 22 infrastructure files. Merge the native stack from bottom to top.

Tests

  • Runner tests and varmat setup/error-handling tests pass.
  • GCC PCH and Ninja builds pass their test target.
  • All 13 retained Math headers compile standalone without PCH.
  • The combined stack passes 324 generated probability tests, 18 focused expression tests, seven two-rank MPI tests, and shuffled threaded/non-threaded core tests.
  • Dependency checks and Jenkins command capture pass.
  • Full GPU, Windows, documentation-build, and complete unit/probability matrices remain for CI.

Side Effects

CMake becomes the Math test runner and CI backend. Directory selections run grouped executables; individual source selections remain supported. The default ReleaseTesting configuration keeps assertions enabled. This PR targets the preceding CVODES solver-fix PR in the native stack.

Release notes

Add CMake as the backend for Math tests and CI.

Checklist

  • Copyright holder: Simons Foundation
  • The complete basic-test and CI matrix is passing
  • C++ idioms and Doxygen documentation have completed review
  • Focused validation is passing as described above; remaining coverage is listed

CI repair

The Windows x64 and ARM64 reverse-mode failures in run 41720340936 come from stale CVODES quadrature output. The fix and regression are reviewed separately in #3508, now the immediate prerequisite. This PR retains exactly its original 22-file infrastructure diff. The updated native Windows CI is pending.

Related PRs

Native stack: https://github.com/stan-dev/math/stack/3509

@SteveBronder
SteveBronder added this pull request to stack #3507 November 3, 2026 21:16
@SteveBronder
SteveBronder removed this pull request from stack #3507 November 4, 2026 16:44
@SteveBronder
SteveBronder changed the base branch from cmake-split/05-unit-tests to fix/cvodes-adjoint-quadrature-output November 4, 2026 16:44
@SteveBronder
SteveBronder added this pull request to stack #3509 November 4, 2026 16:44
@SteveBronder SteveBronder changed the title [CMake 6/6] Add CMake builds and migrate the test runner and CI [CMake 7/7] Add CMake builds and migrate the test runner and CI Nov 4, 2026
@SteveBronder
SteveBronder force-pushed the cmake-split/06-cmake branch 2 times, most recently from 0f38183 to 9e5813e Compare November 5, 2026 14:39
@WardBrian
WardBrian force-pushed the cmake-split/06-cmake branch from 9e5813e to 71fe850 Compare November 6, 2026 10:47
Add CMake targets for dependencies, individual and grouped tests, header
checks, and generated probability/expression tests. Migrate runTests.py,
Python test tools, Jenkins and GitHub CI together; document the workflow.

Retain Makefiles for upstream consumers. Preserve explicit callback
captures with a Clang test-only unused-capture warning exception.
Exclude unrelated numerical, solver and tolerance changes.
@WardBrian
WardBrian force-pushed the cmake-split/06-cmake branch from 71fe850 to 448bf03 Compare November 6, 2026 20:06

This branch has not been deployed

No deployments
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.

1 participant