GitHub Actions Matrix Builder
Preview GitHub strategy combinations with accurate include/exclude expansion, scalar typing, concurrency, and job limits.
Matrix Axes
Add each matrix axis as a name and comma-separated values. Quoted commas are supported.
Include Rules
Add extra matrix combinations or add fields to a specific combination.
No rules added.
Exclude Rules
Remove specific matrix combinations from the final result.
No rules added.
Output Options
No matrix combinations yet
Add at least one axis or an include-only combination.
Matrix Output
strategy:
fail-fast: true
matrix:
# Add an axis or include-only combinationThe Cartesian product is only the starting matrix
Base axes create a Cartesian product: three operating systems and two language versions start with six combinations. GitHub then applies exclude and processes each include object. The preview follows those rules rather than simply appending every include row.
Include can enrich existing combinations or create a new one
An include object is merged into compatible base combinations when it does not overwrite their original axis values. If it cannot be merged into any compatible combination, GitHub creates a new matrix combination. Added fields from an earlier include may be replaced by a later include; original axis values are not overwritten.
Matrix value type can change workflow behavior
Values are kept as strings by default because version-like text such as 3.10 should not accidentally become the number 3.1. Turn string preservation off only when you deliberately want YAML booleans, numbers, or null. Quoted list entries can contain commas.
The 256-job limit is a hard workflow boundary
GitHub limits a matrix to 256 generated jobs per workflow run. The page warns when the final expanded matrix exceeds that limit and also stops materializing extremely large browser previews before they consume unreasonable memory. max-parallel controls concurrency; it does not reduce the number of jobs generated.
Job snippets deliberately avoid inventing CI steps
The full-job output contains runs-on, the matrix strategy, and a placeholder for your own steps. It does not automatically add checkout or setup actions, because those are workflow decisions with their own permissions, versioning, and supply-chain implications.
GitHub is the authority for expansion semantics
GitHub documents matrix expansion, partial-match excludes, include processing, fail-fast, max-parallel, and the 256-job cap in the workflow syntax reference.
