mirror of
https://github.com/threeal/cmake-action.git
synced 2025-04-20 02:31:20 +00:00
* 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>
19 lines
402 B
TypeScript
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);
|
|
}
|