Condition field for workflow presets

Workflows presets don’t currently have a condition field, which is unfortunate. Some workflows may consist of platform-specific presets, such as building for XCode or Visual Studio.

I suggest either:

  • giving workflow presets a condition field
  • calculating which workflow presets are unavailable based on each step preset’s condition(s)

The former makes more sense to me. Maybe one wants to skip a step in some situation (e.g., testing for clang-tidy?) and having to do a new workflow for that seems a bit unfortunate.

1 Like

Having a workflow silently skip steps for which a condition is false seems attractive at first, but I would have concerns about the robustness of that. Giving workflow presets as a whole a condition field would be less risky.

1 Like

If workflows are going to allow but skip steps that have false conditions, then I would suggest that CMake exits with a success code if at least the configure preset had a true condition, and exits with a failure code otherwise.