Multiple machines

I need to run benchmark tests as part of a CI run. These tests are performance-sensitive, and so they require separate VMs for each component (database, search engine, etc.).

From what I can tell, each job can only run on one machine. Is there no support for provisioning multiple machine resources and scheduling steps to run on them?

You should be able to make use of matrix jobs to specify a matrix of resource classes:

As an example, this would build on the medium and large resource classes with machine executor:

version: 2.1

jobs:
  build:
    parameters:
      resource:
        type: string
    resource_class: << parameters.resource >>
    machine:
      image: ubuntu-1604:202007-01
    steps:
      - run: echo 1

workflows:
  workflow:
    jobs:
      - build:
          matrix:
            parameters:
              resource: ["medium", "large"]

That only runs the test on one machine at a time, though, as far as I can see. I’m asking about starting multiple machines during a single build, and scheduling different job steps on them. Considering that CircleCI supports detached steps with background: true, I’m surprised there’s no way to tell it where to run the steps.