matrix.yaml reference#
ci/matrix.yaml is the authoritative definition of CCCL’s CI job matrix. It declares
the workflows, the toolchain and hardware vocabulary jobs draw from, and the per-workflow
job entries that expand into individual GitHub Actions jobs.
Top-level keys#
Key |
Purpose |
|---|---|
|
Map of workflow name to a list of job entries. Holds |
|
Image version tag for |
|
Compiler versions used for internal cuda99.X builds. |
|
Every C++ standard CCCL supports (used for |
|
Map of supported CUDA Toolkit versions to supported standards and aliases. |
|
Device compiler definitions ( |
|
Host compiler definitions ( |
|
Job type definitions: GPU requirement, dependencies, and script invocation. |
|
Project definitions: supported standards, display name, and |
|
GPU runner pools and their |
|
The fields a job entry accepts, with |
exclude is nested under workflows. Entries matching an exclude rule are removed
from every workflow’s generated matrix.
Workflow types#
Workflow |
Purpose |
|---|---|
|
Overrides the CI jobs run for the active PR when defined. Blocks merge while set. |
|
Default per-PR matrix. |
|
Reduced matrix run when only an upstream dependency changed. (See Change detection.) |
|
Extended scheduled matrix. |
|
Broadest scheduled matrix, including |
|
Python wheel build and test matrix. |
|
Image-generation matrix. Entries catalog currently available devcontainer configs and map to no real jobs. |
Job entry format#
A job entry is a YAML mapping. Array-valued fields expand to the cross-product of their
elements; exclude rules are applied after expansion. The fields a user specifies are the
tags in the tags section.
Current defaults for all tags are defined in the tags section of ci/matrix.yaml.
Field |
Meaning |
|---|---|
|
Job types to run (e.g. |
|
Project key from the |
|
CUDA Toolkit version or alias from |
|
Host compiler. A bare name resolves to the latest version (see below). |
|
Device compiler from |
|
C++ standard. Accepts an integer or the |
|
CPU architecture ( |
|
GPU runner type from |
|
GPU architectures, |
|
Python version for Python jobs. |
|
Arguments appended to the generated command. Forwards options to
|
|
Extra CMake defines, passed as |
|
Environment variables injected into the job. |
Computed internally, not user-specified:
needs— defined in thejobssection. Atestentry auto-generates itsbuildproducer.gpurequirement,cuda_ext,name, andinvokescript details - also taken from thejobssection.force_producer_ctk— set in thejobssection to pin a producer build’s CTK independent of the consumer’sctktag. Used mainly for python packaging special cases.
Annotated example#
- {jobs: ['test'], # build (auto-added) then test
project: 'thrust', # only thrust
std: 'max', # highest std supported by thrust, ctk, and compiler
cxx: ['gcc', 'clang'], # expands to two jobs, latest gcc and latest clang
gpu: 'h100', # test job runs on an h100 runner
sm: 'gpu', # build for the SM of the h100 runner (sm_90)
cmake_options: '-DCMAKE_CUDA_FLAGS="-lineinfo"'} # customize cmake config
This expands to two build jobs — one per compiler. Thrust’s job_map expands test
to test_cpu and test_gpu, so the two compilers produce four combined test jobs. The test
jobs request h100 runners; the auto-generated build producers run on CPU runners using
-lineinfo for CUDA targets and only produce device code for the h100’s SM90 arch.
In total this spawns six jobs:
build gcc
build clang
test_cpu gcc
test_cpu clang
test_gpu gcc
test_gpu clang
C++ standard resolution#
std accepts integers or four keywords resolved against the intersection of the standards
supported by the selected CTK, host compiler, device compiler, and project:
Value |
Resolves to |
|---|---|
|
One job per supported standard. |
|
The lowest supported standard. |
|
The highest supported standard. |
|
The lowest and highest, two jobs. |
Compiler version resolution#
A bare compiler name in cxx resolves to the latest version listed for that compiler in
host_compilers. cxx: 'gcc' selects the highest gcc version under
host_compilers.gcc.versions. Pin a version by naming it: cxx: 'gcc13'.
Version aliases resolve the same way. cxx: 'msvc2022' maps to the msvc version whose
alias is 2022. CTK aliases follow the ctk_versions map: ctk: '13.X' selects the
newest CTK 13 entry, ctk: 'nvhpc' selects the CTK shipped in the current NVHPC.
Each version entry declares its own supported standards. std resolution and the
exclude rules drop combinations a compiler version does not support.