mirror of
https://github.com/threeal/cmake-action.git
synced 2025-06-13 04:31:21 +00:00
* refactor: add `configureProject` function from lines in `main` function * test: add test for `configureProject` function * refactor: add `buildProject` function from lines in `main` function
18 lines
389 B
TypeScript
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));
|