cmake-action/src/action.ts
Alfi Maulana 478382dd46
feat: use asynchronous version of the exec file function (#522)
* feat: add `exec` function

Signed-off-by: Alfi Maulana <alfi.maulana.f@gmail.com>

* feat: use `exec` function in `configureProject` and `buildProject` functions

Signed-off-by: Alfi Maulana <alfi.maulana.f@gmail.com>

---------

Signed-off-by: Alfi Maulana <alfi.maulana.f@gmail.com>
2024-11-21 22:16:53 +07:00

19 lines
402 B
TypeScript

import { logError, setOutput } from "gha-utils";
import { buildProject, configureProject } from "./cmake.js";
import { getContext } from "./context.js";
try {
const context = getContext();
await configureProject(context);
await setOutput("build-dir", context.buildDir);
if (context.build.enabled) {
await buildProject(context);
}
} catch (err) {
logError(err);
process.exit(1);
}