-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
action.yml
93 lines (87 loc) · 5.33 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Copyright (c) 2019-2020-2021-2023 Luca Cappa
# Released under the term specified in file LICENSE.txt
# SPDX short identifier: MIT
name: 'run-cmake'
description: 'Run CMake with CMakePreset.json to configure, build, package and test C/C++ source code.'
author: 'Luca Cappa https://github.com/lukka'
inputs:
# The following 'inputs' are commonly defined by the user in the workflow.
cmakeListsTxtPath:
default: "${{ github.workspace }}/CMakeLists.txt"
required: false
description: "Path to CMakeLists.txt."
workflowPreset:
default: ""
required: false
description: "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."
configurePreset:
default: ""
required: false
description: "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."
buildPreset:
default: ""
required: false
description: "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.'"
testPreset:
default: ""
required: false
description: "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.'"
packagePreset:
default: ""
required: false
description: "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.'"
configurePresetAdditionalArgs:
default: "[]"
required: false
description: "A string representing list of additional arguments for configuring. Optional. Useful when specifing additional variables such as, e.g., ['-DVARIABLE=NAME', '-DANOTHERVARIABLE=ANOTHERNAME']"
buildPresetAdditionalArgs:
default: "[]"
required: false
description: "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']"
testPresetAdditionalArgs:
default: "[]"
required: false
description: "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']"
packagePresetAdditionalArgs:
default: "[]"
required: false
description: "A string representing list of additional arguments for cpack. Optional."
# The following inputs are rarely set by the user, since the default values suffice the most common scenarios.
useShell:
default: true
required: false
description: "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."
logCollectionRegExps:
default: "\\s*\"(.+CMakeOutput\\.log)\"\\.\\s*;\\s*\"(.+CMakeError\\.log)\"\\.\\s*;\\s*(.+out\\.log)\\s*;\\s+(.+err\\.log)\\s*;\\s*(.+vcpkg.+\\.log)\\s*"
required: false
description: "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."
workflowPresetCmdString:
default: "[`--workflow`, `--preset`, `$[env.WORKFLOW_PRESET_NAME]`, `--fresh`]"
required: false
description: "The CMake command format string to run the workflow steps."
configurePresetCmdString:
default: "[`--preset`, `$[env.CONFIGURE_PRESET_NAME]`]"
required: false
description: "The CMake command format string to configure and generate project files."
buildPresetCmdString:
default: "[`--build`, `--preset`, `$[env.BUILD_PRESET_NAME]`]"
required: false
description: "The CMake command format string to run the build."
testPresetCmdString:
default: "[`--preset`, `$[env.TEST_PRESET_NAME]`]"
required: false
description: "The CTest command format string to run test."
packagePresetCmdString:
default: "[`--preset`, `$[env.PACKAGE_PRESET_NAME]`]"
required: false
description: "The CPack command format string to package the project."
runVcpkgEnvFormatString:
default: "[`env`, `--bin`, `--include`, `--tools`, `--python`, `--triplet`, `$[env.VCPKG_DEFAULT_TRIPLET]`, `set`]"
required: false
description: "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."
runs:
using: 'node20'
main: './dist/index.js'
branding:
icon: 'terminal'
color: 'green'