lukka/run-cmake
Run CMake with CMakePreset.json to configure, build, package and test C/C++ source code.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jun 30, 2026
- License
- MIT
Pinned Snippet
uses: lukka/run-cmake@5d55ea7949e25f69f0ecb516d8d572297e03a956 # v10.9tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| cmakeListsTxtPath | Path to CMakeLists.txt. | no | ${{ github.workspace }}/CMakeLists.txt |
| workflowPreset | The name of the workflow preset. Optional, it cannot be used with any other preset input. This value is stored in the WORKFLOW_PRESET_NAME environment variable, and used by the default value of 'workflowPresetCmdString' input. | no | "" |
| configurePreset | The name of the configure preset. Optional, but at least one of the preset input must be provided. This value is stored in the CONFIGURE_PRESET_NAME environment variable, and used by the default value of 'configurePresetCmdString' input. | no | "" |
| buildPreset | The name of the build preset. Optional, but at least one of the preset input must be provided. This value is stored in the BUILD_PRESET_NAME environment variable, and used by the default value of 'buildPresetCmdString' input.' | no | "" |
| testPreset | The name of the test preset (ctest). Optional, but at least one of the preset input must be provided. This value is stored in the TEST_PRESET_NAME environment variable, and used by the default value of 'testPresetCmdString' input.' | no | "" |
| packagePreset | The name of the package preset (cpack). Optional, but at least one of the preset input must be provided. This value is stored in the PACKAGE_PRESET_NAME environment variable, and used by the default value of 'packagePresetCmdString' input.' | no | "" |
| configurePresetAdditionalArgs | A string representing list of additional arguments for configuring. Optional. Useful when specifing additional variables such as, e.g., ['-DVARIABLE=NAME', '-DANOTHERVARIABLE=ANOTHERNAME'] | no | [] |
| buildPresetAdditionalArgs | A string representing list of additional arguments for building. Optional. Useful when specifing the config to build with a multi configuration generator, e.g., ['--config DEBUG'] | no | [] |
| testPresetAdditionalArgs | A string representing list of additional arguments for testing. Optional. Useful when specifing the config to test with a multi configuration generator, e.g., ['--config DEBUG'] | no | [] |
| packagePresetAdditionalArgs | A string representing list of additional arguments for cpack. Optional. | no | [] |
| useShell | Specify which shell to be used when launching commands. 'true' means the default shell is used. 'false' means no shell is used. It also can be an absolute with arguments of the shell to spawn commands with. | no | true |
| logCollectionRegExps | Specifies a semicolon separated list of regular expressions that are used to identify log file paths in the workflow output. A regular expression must have a single capturing group, that is a single pair of parenthesis such as 'See also (.+.log)'. When a match occurs, the content of the file is written into the workflow output for disclosing its content to the user. The default regular expressions are for CMake's and vcpkg's log files. | no | \s*"(.+CMakeOutput\.log)"\.\s*;\s*"(.+CMakeError\.log)"\.\s*;\s*(.+out\.log)\s*;\s+(.+err\.log)\s*;\s*(.+vcpkg.+\.log)\s* |
| workflowPresetCmdString | The CMake command format string to run the workflow steps. | no | [`--workflow`, `--preset`, `$[env.WORKFLOW_PRESET_NAME]`, `--fresh`] |
| configurePresetCmdString | The CMake command format string to configure and generate project files. | no | [`--preset`, `$[env.CONFIGURE_PRESET_NAME]`] |
| buildPresetCmdString | The CMake command format string to run the build. | no | [`--build`, `--preset`, `$[env.BUILD_PRESET_NAME]`] |
| testPresetCmdString | The CTest command format string to run test. | no | [`--preset`, `$[env.TEST_PRESET_NAME]`] |
| packagePresetCmdString | The CPack command format string to package the project. | no | [`--preset`, `$[env.PACKAGE_PRESET_NAME]`] |
| runVcpkgEnvFormatString | Specify the command line to dump the environment variables with the 'vcpkg env' command. This command is only used when setting up the environment for MSVC on Windows. | no | [`env`, `--bin`, `--include`, `--tools`, `--python`, `--triplet`, `$[env.VCPKG_DEFAULT_TRIPLET]`, `set`] |
Outputs
no outputs