Runs cmake -P test/install.cmake from the repository root. Provide a script
that:
- Configures and builds the project using the workflow's compiler and generator settings.
- Installs it to a temporary directory and relocates that installation.
- Builds and runs a separate consumer using the installed headers and exported CMake targets, without relying on the source or build tree.
The checks must run offline and propagate build and test failures as script errors.
Packages wheel artifacts as standalone C++ archives, tests them after
relocation, and uploads cpp-archives-<runner>.
The wheel artifact must contain one project's wheels for that platform. When multiple Python variants are available, the first non-musllinux wheel in lexicographic filename order supplies the C++ installation. That installation must be independent of the Python variant.
Provide .github/cpp-packaging.json in the calling repository:
{
"package": "my-library",
"install-prefix": "my/package"
}package names the exported CMake package. install-prefix is its directory
inside the wheel. Archive names use the wheel's platform tag.
Only the CMake installation directories (bin, include, lib, lib64, and
share) are included, leaving out Python modules and bindings. Shared libraries
must use relocatable runtime search paths.
The caller's test/install.cmake must also accept -Dinstalled_prefix=<path>
to test an existing installation without rebuilding the package. Wheels must
include headers, CMake package files, and license notices.
Runs C++ tests with AppleClang by default. To use a Homebrew compiler, add its
formula to brew-packages and select its executables in the CMake preset.
Runs C++ tests with the runner's default compiler unless the CMake preset
selects another. To use a specific Clang release, pass its major version to
clang-version.
Runs C++ tests in the Visual Studio developer shell, using MSVC by default. To
use clang-cl with Ninja, set CC and CXX to its executable in the CMake
preset.
Builds documentation with uvx nox --non-interactive -s docs. The session must
produce docs/_build/html/index.html. Use the change detector's run-docs
output to condition the job and include it in the aggregate CI check.
For Read the Docs publication, call the workflow from a default-branch
workflow_run listener for completed builds. Provide a Read the Docs token and
project slug. PR previews use the PR number, the default branch publishes as
latest, and tags publish under their own names. The highest stable version
also updates stable. See the direct upload guide.
Publishes a GitHub release with links to the project's changelog and optional
upgrade guide, or with GitHub's full generated release notes. New-contributor
notes are included when available. It attaches any cpp-archives-* artifacts
with checksums. Publishing creates the version tag at the caller's commit and
fails if that tag already exists. Pass previous-version (for example, 3.2.0)
to set the starting point for both the release notes and the comparison link
when releasing from a maintenance branch.
Publication uses the calling repository's GITHUB_TOKEN by default. To trigger
tag or release workflows, pass a GitHub App's client ID as APP_ID and its
private key as APP_PRIVATE_KEY. The app needs permission to write repository
contents. Retrying the workflow preserves a published release.
Builds a source distribution with uv, then builds a pure Python wheel from that
archive. It uploads them as cibw-sdist and cibw-wheel, with a dev- prefix
on pull requests.
Builds a source distribution alongside platform wheels for Linux, macOS, and
Windows. To choose which runners build wheels, pass their labels as a JSON array
in runners. It uploads cibw-sdist and cibw-wheels-<runner>, with a dev-
prefix on pull requests.