mirror of https://github.com/aminya/setup-cpp
feat: support installing gnu make
This commit is contained in:
parent
5c0c45d42f
commit
4b0650a08c
|
@ -23,6 +23,7 @@ The package can be used locally or from CI services like GitHub Actions.
|
|||
- vcpkg
|
||||
- meson
|
||||
- conan
|
||||
- make
|
||||
- ccache
|
||||
- cppcheck
|
||||
- clangtidy
|
||||
|
|
|
@ -30,6 +30,9 @@ inputs:
|
|||
conan:
|
||||
description: "The conan version to install."
|
||||
required: false
|
||||
make:
|
||||
description: "The make version to install."
|
||||
required: false
|
||||
vcpkg:
|
||||
description: "The vcpkg version to install."
|
||||
required: false
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,7 @@
|
|||
import * as core from "@actions/core"
|
||||
import { setupBrew } from "./brew/brew"
|
||||
import { setupCcache } from "./ccache/ccache"
|
||||
import { setupMake } from "./make/make"
|
||||
import { setupChocolatey } from "./chocolatey/chocolatey"
|
||||
import { setupCmake } from "./cmake/cmake"
|
||||
import { setupConan } from "./conan/conan"
|
||||
|
@ -50,6 +51,7 @@ const setups = {
|
|||
msvc: setupMSVC,
|
||||
vcvarsall: setupVCVarsall,
|
||||
kcov: setupKcov,
|
||||
make: setupMake,
|
||||
}
|
||||
|
||||
/** The tools that can be installed */
|
||||
|
@ -74,6 +76,7 @@ const tools: Array<keyof typeof setups> = [
|
|||
"msvc",
|
||||
"vcvarsall",
|
||||
"kcov",
|
||||
"make",
|
||||
]
|
||||
|
||||
/** The possible inputs to the program */
|
||||
|
@ -282,6 +285,7 @@ All the available tools:
|
|||
--vcpkg
|
||||
--meson
|
||||
--conan
|
||||
--make
|
||||
--ccache
|
||||
--cppcheck
|
||||
--clangformat
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
import { setupMake } from "../make"
|
||||
import { testBin } from "../../utils/tests/test-helpers"
|
||||
import { InstallationInfo } from "../../utils/setup/setupBin"
|
||||
|
||||
jest.setTimeout(300000)
|
||||
describe("setup-make", () => {
|
||||
it("should setup make", async () => {
|
||||
const installInfo = await setupMake("", "", process.arch)
|
||||
|
||||
await testBin("make", ["--version"], (installInfo as InstallationInfo | undefined)?.binDir)
|
||||
})
|
||||
})
|
|
@ -0,0 +1,21 @@
|
|||
import { setupAptPack } from "../utils/setup/setupAptPack"
|
||||
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
||||
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export function setupMake(version: string, _setupDir: string, _arch: string) {
|
||||
switch (process.platform) {
|
||||
case "win32": {
|
||||
return setupChocoPack("make", version)
|
||||
}
|
||||
case "darwin": {
|
||||
return setupBrewPack("make", version)
|
||||
}
|
||||
case "linux": {
|
||||
return setupAptPack("make", version)
|
||||
}
|
||||
default: {
|
||||
throw new Error(`Unsupported platform`)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue