Build matrix


The main missing feature for us of CircleCI is matrix builds. These are useful for checking that your projects builds with e.g. multiple versions of a compiler. Or to check different combinations of build flags. It would be great to be able to divide builds into “jobs”, and have the UI report the failure/success of each job in a build. Each job would be a combination of environment variables / build settings.

The recommendation from CircleCI is to use parallelism for this. But,

  1. parallel containers are expensive
  2. you still don’t get independent failure reports (so it’s difficult to tell what fails and what doesn’t)
  3. manually dispatching on $CIRCLE_NODE_INDEX is verbose and error prone.

Multiple builds from the same branch
Multiple YAML files for cross-platform projects and easier test matrix configuration
Support for Multiple OSs
Multiple php versions build matrix
Using CircleCI to set Rubygems Credentials

This may be a usable workaround in the meantime. I haven’t tested it myself though.


I was just going to investigate how this was handled in circleci.

@drazisil, could you add a link to the post or web page that gives the instructions on how to use parallelism to solve this. For me I simply need to set a “global” environment variable to different values so maybe it will work for me. I’ll take a look at Michael’s circleci suggestion.

Thanks for requesting this feature.


So I looked at Michael’s code and it will do what I need. I’ve made some changes here if anyone’s interested and have offered it as a pull request to Michael.


Looks great, glad it helped! :smile:


As additional input into this feature request, I have the issue of wanting to run unittests for an app and run fuller selenium based integration tests both at PR time.

I’d like unit test results to come back quick so that developers can make amendments, or push files they’ve forgotten to - and the selenium test results would run and update the commit result upon completion

At the moment we have to chain the build (the unittest run triggers the selenium run), but if the selenium test run fails we are not notified.


everybody lacks matrix( and there’s nothing yet until now.
I’ve made circleci-helpers with environment matrix (1 dimension), please check it out might be helpful


An easy solution is to use tox ( which is a generic, robust test runner and supports build matrices.


We are enabling first class support for running multiple jobs for CircleCI 2.0. Right now we are adding a limited number of customers. If you are interested in trying out, please reach out at with your VCS organization and repository name.


This can be done today using [Workflows] ( Please reach out if you are facing issues.


For an example of a build matrix config file using workflows on CircleCI 2.0, please see this post.