mirror of
https://github.com/threeal/cmake-action.git
synced 2026-02-01 19:40:49 +00:00
feat: remove support for auto-install Ninja (#258)
* feat: remove support for auto-installing Ninja * ci: add step for setting up Ninja in `test-action-with-custom-tools` job * docs: update readme related to auto-install Ninja support removal
This commit is contained in:
15
src/index.ts
15
src/index.ts
@@ -1,6 +1,5 @@
|
||||
import * as core from "@actions/core";
|
||||
import { exec } from "@actions/exec";
|
||||
import { which } from "@actions/io";
|
||||
import { getInputs } from "./inputs.js";
|
||||
|
||||
async function main() {
|
||||
@@ -12,20 +11,6 @@ async function main() {
|
||||
configureArgs.push(...["-G", inputs.generator]);
|
||||
}
|
||||
|
||||
if (inputs.generator.match(/ninja/gi) && !(await which("ninja"))) {
|
||||
switch (process.platform) {
|
||||
case "linux":
|
||||
await exec("sudo", ["apt", "install", "-y", "ninja-build"]);
|
||||
break;
|
||||
case "darwin":
|
||||
await exec("brew", ["install", "ninja"]);
|
||||
break;
|
||||
case "win32":
|
||||
await exec("choco", ["install", "ninja"]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (inputs.cCompiler) {
|
||||
configureArgs.push("-DCMAKE_C_COMPILER=" + inputs.cCompiler);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user