cmake-action/src/index.ts
Alfi Maulana 0df49588a5
refactor: add CMake execution functions (#263)
* refactor: add `configureProject` function from lines in `main` function

* test: add test for `configureProject` function

* refactor: add `buildProject` function from lines in `main` function
2024-03-24 23:41:08 +08:00

18 lines
389 B
TypeScript

import * as core from "@actions/core";
import { buildProject, configureProject } from "./cmake.js";
import { getInputs } from "./inputs.js";
async function main() {
const inputs = getInputs();
await configureProject(inputs);
core.setOutput("build-dir", inputs.buildDir);
if (inputs.runBuild) {
await buildProject(inputs);
}
}
main().catch((err) => core.setFailed(err));