Matrix Expansion
A build contains one or more jobs to run in parallel or stages.
These jobs come out of the build matrix expansion. Additional jobs can be added manually using the matrix key.
The build matrix expansion is driven by matrix expansion keys that are defined in the build configuration. If no expansion keys are given, or they only have a single value each, then the resulting build will only have a single job.
For example, the keys os
and python
(on Python builds) are matrix expansion
keys.
If just os
is given as:
os:
- linux
- osx
Then the resulting build will have two jobs, one configured to run on os:
linux
, one on os: osx
.
If both os
and python
are given as:
os:
- linux
- osx
python:
- 2.7
- 3.6
- 3.7
Then the resulting build will have 6 jobs, combining each os
with each one of
the python
versions.
Matrix expansion keys
The following expansion keys are known:
os
arch
env.matrix
(alsoenv
due to normalization of maps, if no keyglobal
ormatrix
is present)
The following expansion keys are supported depending on the language selected:
compiler
osx_image
jdk
crystal
dotnet
mono
solution
d
dart
dart_task
elixir
otp_release
elm
node_js
go
hhvm
php
ghc
haxe
julia
matlab
nix
perl
perl6
python
r
rvm
gemfile
xcode_scheme
xcode_sdk
rust
scala
smalltalk
smalltalk_config
smalltalk_vm