Module matrix

Module matrix 

Source
Expand description

Feature matrix generation for cargo xtask test and cargo xtask clippy.

Scans every Cargo.toml in the workspace, collects the union of all non-default feature names, and produces every power-set combination crossed with a list of target operating systems. Each combination becomes one MatrixEntry that maps to a single CI job.

The same entries are used locally (by test and clippy tasks) and in CI (by cargo xtask ci matrix, which serialises them to GitHub Actions JSON).

Structsยง

MatrixEntry
One entry in the feature ร— OS matrix.

Constantsยง

CI_CLIPPY_OS
Operating systems included in the CI clippy matrix.

Functionsยง

build_matrix ๐Ÿ”’
collect_workspace_features ๐Ÿ”’
is_ignored ๐Ÿ”’
normalize_features_arg
Normalises a --features argument to the label format used by the matrix.
scan
Scans the workspace and returns the full feature ร— OS matrix.
to_github_matrix_json
Serialises the matrix to the JSON shape GitHub Actions expects for a dynamic matrix:
to_github_test_matrix_json
Serialises the matrix to a JSON shape for the test job.