lukka / run-cmake

GitHub Action to build C++ applications with CMake (CMakePresets.json), Ninja and vcpkg on GitHub.
MIT License
171 stars 19 forks source link

Support workflow presets #102

Closed quyykk closed 1 year ago

quyykk commented 1 year ago

CMake 3.25 adds a new preset, the workflow preset, which is very useful in CI because it describes an arbitrary sequence of build and test (and package) presets.

Thanks!

lukka commented 1 year ago

@quyykk how do you think this should work for run-cmake?

  1. One way would be to add a new input called workflowPreset, a string, which when it's set, the action runs cmake --workflow --preset <name>.
  2. When workflowPreset is set, the buildPreset and configurePreset inputs are disregarded (with a warning message).
  3. Is a workflowPresetAdditionalArgs input useful?

Any input is appreciated, thanks!

quyykk commented 1 year ago

One way would be to add a new input called workflowPreset, a string, which when it's set, the action runs cmake --workflow --preset <name>.

yeah. Does it makes sense to pass --fresh as well (it cleans any build files)?

When workflowPreset is set, the buildPreset and configurePreset inputs are disregarded (with a warning message).

makes sense

Is a workflowPresetAdditionalArgs input useful?

The only potential argument to pass is --fresh, so probably not?

lukka commented 1 year ago

@quyykk solved in https://github.com/lukka/run-cmake/releases/tag/v10.3, let me know if this works for you!