mirror of https://github.com/aminya/setup-cpp
fix: pass the default arguments to the functions
This commit is contained in:
parent
511a2fbbce
commit
269d96f070
|
@ -7,7 +7,7 @@ describe("setup-brew", () => {
|
|||
if (process.platform !== "darwin") {
|
||||
return
|
||||
}
|
||||
await setupBrew()
|
||||
await setupBrew("", "", "")
|
||||
|
||||
const { status } = spawn("brew", ["--version"], {
|
||||
encoding: "utf8",
|
||||
|
|
|
@ -4,7 +4,7 @@ import { spawnSync as spawn } from "child_process"
|
|||
jest.setTimeout(200000)
|
||||
describe("setup-ccache", () => {
|
||||
it("should setup ccache", async () => {
|
||||
await setupCcache()
|
||||
await setupCcache("", "", "")
|
||||
|
||||
const { status } = spawn("ccache", ["--version"], {
|
||||
encoding: "utf8",
|
||||
|
|
|
@ -7,7 +7,7 @@ describe("setup-chocolatey", () => {
|
|||
if (process.platform !== "win32") {
|
||||
return
|
||||
}
|
||||
await setupChocolatey()
|
||||
await setupChocolatey("", "", "")
|
||||
|
||||
const { status } = spawn("choco", ["--version"], {
|
||||
encoding: "utf8",
|
||||
|
|
|
@ -3,7 +3,7 @@ import { setupTmpDir, cleanupTmpDir, testBin } from "../../utils/tests/test-help
|
|||
|
||||
jest.setTimeout(200000)
|
||||
async function testCmake(directory: string) {
|
||||
const { binDir } = await setupCmake("3.20.2", directory)
|
||||
const { binDir } = await setupCmake("3.20.2", directory, "")
|
||||
testBin("cmake", binDir)
|
||||
return binDir
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import { spawnSync as spawn } from "child_process"
|
|||
jest.setTimeout(200000)
|
||||
describe("setup-conan", () => {
|
||||
it("should setup conan", async () => {
|
||||
await setupConan("1.40.1")
|
||||
await setupConan("1.40.1", "", "")
|
||||
|
||||
const { status } = spawn("conan", ["--version"], {
|
||||
encoding: "utf8",
|
||||
|
|
|
@ -4,7 +4,7 @@ import { spawnSync as spawn } from "child_process"
|
|||
jest.setTimeout(200000)
|
||||
describe("setup-cppcheck", () => {
|
||||
it("should setup cppcheck", async () => {
|
||||
await setupCppcheck()
|
||||
await setupCppcheck("", "", "")
|
||||
|
||||
const { status } = spawn("cppcheck", ["--version"], {
|
||||
encoding: "utf8",
|
||||
|
|
|
@ -3,6 +3,9 @@ const DefaultVersions: Record<string, string> = {
|
|||
llvm: "11",
|
||||
ninja: "1.10.2",
|
||||
cmake: "3.20.2",
|
||||
gcovr: "5.0",
|
||||
meson: "0.59.1",
|
||||
python: "3.x",
|
||||
}
|
||||
|
||||
/** Get the default version if passed true or undefined, otherwise return the version itself */
|
||||
|
|
|
@ -4,7 +4,7 @@ import { spawnSync as spawn } from "child_process"
|
|||
jest.setTimeout(200000)
|
||||
describe("setup-doxygen", () => {
|
||||
it("should setup doxygen", async () => {
|
||||
await setupDoxygen()
|
||||
await setupDoxygen("", "", "")
|
||||
|
||||
const { status } = spawn("doxygen", ["--version"], {
|
||||
encoding: "utf8",
|
||||
|
|
|
@ -4,7 +4,7 @@ import { spawnSync as spawn } from "child_process"
|
|||
jest.setTimeout(200000)
|
||||
describe("setup-gcovr", () => {
|
||||
it("should setup gcovr", async () => {
|
||||
await setupGcovr("5.0")
|
||||
await setupGcovr("5.0", "", "")
|
||||
|
||||
const { status } = spawn("gcovr", ["--version"], {
|
||||
encoding: "utf8",
|
||||
|
|
|
@ -46,7 +46,7 @@ describe("setup-llvm", () => {
|
|||
})
|
||||
|
||||
it("should setup LLVM", async () => {
|
||||
const { binDir } = await setupLLVM("12.0.0", directory)
|
||||
const { binDir } = await setupLLVM("11.0.0", directory, "")
|
||||
expect(binDir).toBeDefined()
|
||||
expect(binDir).not.toHaveLength(0)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import { spawnSync as spawn } from "child_process"
|
|||
jest.setTimeout(200000)
|
||||
describe("setup-meson", () => {
|
||||
it("should setup meson", async () => {
|
||||
await setupMeson("0.59.1")
|
||||
await setupMeson("0.59.1", "", "")
|
||||
|
||||
const { status } = spawn("meson", ["--version"], {
|
||||
encoding: "utf8",
|
||||
|
|
|
@ -7,7 +7,7 @@ describe("setup-msvc", () => {
|
|||
if (process.platform !== "win32") {
|
||||
return
|
||||
}
|
||||
await setupMSVC("2017")
|
||||
await setupMSVC("2019", "", "")
|
||||
|
||||
const { status } = spawn("cl", {
|
||||
encoding: "utf8",
|
||||
|
|
|
@ -2,7 +2,6 @@ import { setupMSVCDevCmd } from "./msvc-dev-cmd/index"
|
|||
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
||||
import { exportVariable } from "@actions/core"
|
||||
import { existsSync } from "fs"
|
||||
import { arch as osArch } from "os"
|
||||
|
||||
type MSVCVersion = "2015" | "2017" | "2019" | string
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import { setupTmpDir, cleanupTmpDir, testBin } from "../../utils/tests/test-help
|
|||
|
||||
jest.setTimeout(200000)
|
||||
async function testNinja(directory: string) {
|
||||
const { binDir } = await setupNinja("1.10.2", directory)
|
||||
const { binDir } = await setupNinja("1.10.2", directory, "")
|
||||
testBin("ninja", binDir)
|
||||
return binDir
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ describe("setup-OpenCppCoverage", () => {
|
|||
if (process.platform !== "win32") {
|
||||
return
|
||||
}
|
||||
await setupOpencppcoverage()
|
||||
await setupOpencppcoverage("", "", "")
|
||||
|
||||
const { status } = spawn("OpenCppCoverage", ["--version"], {
|
||||
encoding: "utf8",
|
||||
|
|
|
@ -8,7 +8,7 @@ let hasBrew = false
|
|||
/** A function that installs a package using brew */
|
||||
export function setupBrewPack(name: string, version?: string) {
|
||||
if (!hasBrew || which.sync("brew", { nothrow: true }) === null) {
|
||||
setupBrew()
|
||||
setupBrew("", "", "")
|
||||
hasBrew = true
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ let hasChoco = false
|
|||
/** A function that installs a package using choco */
|
||||
export async function setupChocoPack(name: string, version?: string, args: string[] = []) {
|
||||
if (!hasChoco || which.sync("choco", { nothrow: true }) === null) {
|
||||
await setupChocolatey()
|
||||
await setupChocolatey("", "", "")
|
||||
hasChoco = true
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ export async function setupPipPack(name: string, version?: string) {
|
|||
} else if (which.sync("pip", { nothrow: true }) !== null && (await isBinUptoDate("python", "3.0.0"))) {
|
||||
pip = "pip"
|
||||
} else {
|
||||
await setupPython("3.x")
|
||||
await setupPython("3.x", "", "")
|
||||
pip = "pip3"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue