mirror of
https://github.com/threeal/cmake-action.git
synced 2025-06-09 18:51:21 +00:00
feat: run CMake build if run-test
set to true
This commit is contained in:
parent
e57f0f2848
commit
ae10b181ce
4
main/index.mjs
generated
4
main/index.mjs
generated
@ -27246,12 +27246,12 @@ async function main() {
|
||||
await _actions_exec__WEBPACK_IMPORTED_MODULE_1__.exec("cmake", [sourceDir || ".", "-B", buildDir || "build"]);
|
||||
_actions_core__WEBPACK_IMPORTED_MODULE_0__.setOutput("build-dir", buildDir || "build");
|
||||
const runBuild = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getBooleanInput("run-build");
|
||||
if (runBuild) {
|
||||
const runTest = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getBooleanInput("run-test");
|
||||
if (runBuild || runTest) {
|
||||
const buildArgs = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getMultilineInput("build-args")
|
||||
.flatMap((args) => args.split(" "));
|
||||
await _actions_exec__WEBPACK_IMPORTED_MODULE_1__.exec("cmake", ["--build", buildDir || "build", ...buildArgs]);
|
||||
}
|
||||
const runTest = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getBooleanInput("run-test");
|
||||
if (runTest) {
|
||||
const testArgs = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getMultilineInput("test-args")
|
||||
.flatMap((args) => args.split(" "));
|
||||
|
@ -8,14 +8,15 @@ async function main() {
|
||||
core.setOutput("build-dir", buildDir || "build");
|
||||
|
||||
const runBuild = core.getBooleanInput("run-build");
|
||||
if (runBuild) {
|
||||
const runTest = core.getBooleanInput("run-test");
|
||||
|
||||
if (runBuild || runTest) {
|
||||
const buildArgs = core
|
||||
.getMultilineInput("build-args")
|
||||
.flatMap((args) => args.split(" "));
|
||||
await exec.exec("cmake", ["--build", buildDir || "build", ...buildArgs]);
|
||||
}
|
||||
|
||||
const runTest = core.getBooleanInput("run-test");
|
||||
if (runTest) {
|
||||
const testArgs = core
|
||||
.getMultilineInput("test-args")
|
||||
|
Loading…
Reference in New Issue
Block a user