A Build Matrix for Supported Combinations

A build matrix runs representative combinations of operating systems, runtimes, or database choices. It should match the environments a project supports.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Count a small matrix
  2. Identify a useful difference
  3. Count required combinations before scheduling them
  4. Keep artifacts distinguishable across jobs

Count a small matrix

Two runtimes and three operating systems yield six test combinations if all are supported. Excluding one unavailable pairing leaves five. Cartesian products explain the initial count.

Identify a useful difference

A file reader can behave differently when default newline handling depends on platform. Put an explicit example into relevant cells. Line-ending representation supplies a concrete invariant to verify.[1]

Count required combinations before scheduling them

Two operating systems and three language versions give six combinations when every pair is supported. If the oldest runtime is unsupported on one operating system, intentionally exclude that cell and retain five jobs. State which compatibility promise justifies each dimension. See Cartesian products.

Systems X and Y × versions 1, 2, 3 → six cells
Unsupported Y+1 → explicitly exclude
Remaining coverage: X1,X2,X3,Y2,Y3

Keep artifacts distinguishable across jobs

Jobs using a shared output path can accidentally overwrite each other. Name results by revision and target dimensions, then test the consumer chooses the matching artifact. Review exclusions when support policies change.

References

  1. Free Software Foundation, GNU Make Manual ↩