presets: workflow: Run specific steps or subsets
First let me introduce the setup written in yaml for brevity:
workflowPresets:
- name: minimal
steps:
- type: configure
name: minimal
- type: build
name: minimal
- type: test
name: minimal-unit-test
- type: test
name: minimal-functional-test
- name: full
steps:
- type: configure
name: full
- type: build
name: full
- type: test
name: full-unit-test
- type: test
name: full-functional-test
Now I want to add this to a CI where I run in order:
cmake --workflow --preset minimal,full --type configure
cmake --workflow --preset minimal,full --type build
cmake --workflow --preset minimal,full --type test
This way if any of the previous step fails it will gate the other ones so that you don't waste resources. Otherwise if the full run is needed, the current method can be used.
To implement this usefully there are two features that should be added
- Allow for comma separated presets to be run
- The user is responsible to make sure the build directories are different
- It should only be used for workflow presets, otherwise there is an ambiguity when you override the settings, especially if you add
-B
in the configure preset
- Add another cli option
--type
which will filter the types in the workflow and run only the select items- Mutually exclusive with
--fresh
- Reporting step number could be set so that it reports like
step 2 of 4
when run with--type build
, i.e. as if it was run in the full workflow - The user is responsible to make sure the steps are run in a correct order
- Possibly could also add
--step
accepting the specific workflow step number to run
- Mutually exclusive with