diff --git a/action.yml b/action.yml index bf8e895a..5e0e2f37 100644 --- a/action.yml +++ b/action.yml @@ -17,11 +17,9 @@ inputs: required: false cmake: description: "The cmake version to install." - default: "3.20.2" required: false ninja: description: "The ninja version to install." - default: "1.10.2" required: false conan: description: "The conan version to install." diff --git a/src/cmake/cmake.ts b/src/cmake/cmake.ts index 9ae31115..7c4c2d13 100644 --- a/src/cmake/cmake.ts +++ b/src/cmake/cmake.ts @@ -58,7 +58,9 @@ function getCmakePackageInfo(version: string, platform?: NodeJS.Platform): Packa } } +const default_cmake_version = "3.20.2" + /** Setup cmake */ export function setupCmake(version: string, setupCppDir: string): Promise { - return setupBin("cmake", version, getCmakePackageInfo, setupCppDir) + return setupBin("cmake", version === "true" ? default_cmake_version : version, getCmakePackageInfo, setupCppDir) } diff --git a/src/main.ts b/src/main.ts index c84d8359..83a510fe 100644 --- a/src/main.ts +++ b/src/main.ts @@ -20,7 +20,7 @@ function maybeGetInput(key: string) { if (value !== "false" && value !== "") { return value } - return undefined + return undefined // skip installation } export async function main(): Promise { diff --git a/src/ninja/ninja.ts b/src/ninja/ninja.ts index dddad01d..ae11f103 100644 --- a/src/ninja/ninja.ts +++ b/src/ninja/ninja.ts @@ -26,6 +26,8 @@ function getNinjaPackageInfo(version: string, platform: NodeJS.Platform): Packag } } +const default_ninja_version = "1.10.2" + export function setupNinja(version: string, setupCppDir: string): Promise { - return setupBin("ninja", version, getNinjaPackageInfo, setupCppDir) + return setupBin("ninja", version === "true" ? default_ninja_version : version, getNinjaPackageInfo, setupCppDir) }