mirror of https://github.com/aminya/setup-cpp
fix: install clang-tidy and clang-format as well
This commit is contained in:
parent
ccddfedb7d
commit
da1eb59304
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -64,7 +64,7 @@ async function setupLLVMApt(majorVersion: number): Promise<InstallationInfo> {
|
|||
const neededPackages = await patchAptLLVMScript("/tmp/llvm.sh", "/tmp/llvm-setup-cpp.sh")
|
||||
await setupAptPack(neededPackages)
|
||||
await chmod("/tmp/llvm-setup-cpp.sh", "755")
|
||||
await execRoot("bash", ["/tmp/llvm-setup-cpp.sh", majorVersion.toString()], {
|
||||
await execRoot("bash", ["/tmp/llvm-setup-cpp.sh", "all", majorVersion.toString()], {
|
||||
stdio: "inherit",
|
||||
shell: true,
|
||||
})
|
||||
|
|
|
@ -35,20 +35,24 @@ export async function testBin(
|
|||
args: string[] | null = ["--version"],
|
||||
binDir: string | undefined = undefined
|
||||
) {
|
||||
let bin = name
|
||||
if (typeof binDir === "string") {
|
||||
console.log(`Testing the existence of ${binDir}`)
|
||||
expect(binDir).toBeDefined()
|
||||
expect(binDir).not.toHaveLength(0)
|
||||
expect(await pathExists(binDir)).toBeTruthy()
|
||||
bin = join(binDir, addExeExt(name))
|
||||
}
|
||||
try {
|
||||
let bin = name
|
||||
if (typeof binDir === "string") {
|
||||
console.log(`Testing the existence of ${binDir}`)
|
||||
expect(binDir).toBeDefined()
|
||||
expect(binDir).not.toHaveLength(0)
|
||||
expect(await pathExists(binDir)).toBeTruthy()
|
||||
bin = join(binDir, addExeExt(name))
|
||||
}
|
||||
|
||||
if (args !== null) {
|
||||
console.log(`Running ${bin} ${args.join(" ")}`)
|
||||
const { status } = spawn.sync(bin, args, { stdio: "inherit" })
|
||||
expect(status).toBe(0)
|
||||
}
|
||||
if (args !== null) {
|
||||
console.log(`Running ${bin} ${args.join(" ")}`)
|
||||
const { status } = spawn.sync(bin, args, { stdio: "inherit" })
|
||||
expect(status).toBe(0)
|
||||
}
|
||||
|
||||
expect((await io.which(name, true)).includes(bin))
|
||||
expect((await io.which(name, true)).includes(bin))
|
||||
} catch (err) {
|
||||
throw new Error(`Failed to test bin ${name}: ${err}`)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ import { DefaultLinuxVersion, DefaultVersions } from "./default_versions"
|
|||
|
||||
/** Get the default version if passed true or undefined, otherwise return the version itself */
|
||||
export function getVersion(name: string, version: string | undefined, osVersion: number[] | null = null) {
|
||||
console.log("isDefault", version, name, isVersionDefault(version))
|
||||
if (isVersionDefault(version) && process.platform === "linux" && osVersion !== null && name in DefaultLinuxVersion) {
|
||||
return getDefaultLinuxVersion(osVersion, DefaultLinuxVersion[name]!)
|
||||
} else if (isVersionDefault(version) && name in DefaultVersions) {
|
||||
|
|
Loading…
Reference in New Issue