Workflow CMake - BredaUniversityGames/JenkinsLib GitHub Wiki
Runs a full CMake workflow preset (configure + build + test + package in one step).
stages {
git.sync()
cmake.workflow()
// ...
}| Parameter | Default | Description |
|---|---|---|
CMAKE_WORKFLOW_PRESET |
(first preset) | Workflow preset (dropdown populated from CMakePresets.json) |
Note: Requires
workflowPresetsin yourCMakePresets.json. The module is skipped with a warning if none are found.
- Discovers workflow presets from
CMakePresets.json(see cmake.build() — Preset Discovery) - Sets up the Visual Studio environment via
vcvarsall.bat - Runs
cmake --workflow --preset <preset> - Sets
ctx.buildEngine = 'CMake'on the pipeline context
Workflow presets are useful when your CMakePresets.json defines a complete pipeline (configure, build, test, package) as a single workflow. This is simpler than chaining cmake.build() + cmake.test() + cmake.package() separately, but offers less flexibility for customizing individual steps.
| Issue | Solution |
|---|---|
| "requires workflow presets" warning | Ensure your CMakePresets.json contains non-hidden workflowPresets
|
| No workflow preset dropdown | Run the job once so the library discovers your CMakePresets.json, then re-run |