mirror of https://github.com/aminya/setup-cpp
fix: default to LLVM 16 on Windows and Linux
This commit is contained in:
parent
2ab6e8f154
commit
86eecc382e
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
|
@ -2,6 +2,7 @@ import { syncVersions, getVersion } from "../versions/versions"
|
|||
import { parseArgs } from "../cli-options"
|
||||
import { getCompilerInfo } from "../compilers"
|
||||
import { Inputs } from "../tool"
|
||||
import { DefaultLinuxVersion } from "../versions/default_versions"
|
||||
|
||||
jest.setTimeout(300000)
|
||||
describe("getCompilerInfo", () => {
|
||||
|
@ -63,9 +64,9 @@ describe("getVersion", () => {
|
|||
it("llvm", () => {
|
||||
expect(getVersion("llvm", "13.0.0")).toBe("13.0.0")
|
||||
if (process.platform === "linux") {
|
||||
expect(getVersion("llvm", "true", [20, 4])).toBe("15.0.6-ubuntu-18.04")
|
||||
expect(getVersion("llvm", "true", [18, 4])).toBe("15.0.6-ubuntu-18.04")
|
||||
expect(getVersion("llvm", "true", [16, 4])).toBe("15.0.6-ubuntu-18.04")
|
||||
expect(getVersion("llvm", "true", [20, 4])).toBe(DefaultLinuxVersion["llvm"]![20])
|
||||
expect(getVersion("llvm", "true", [18, 4])).toBe(DefaultLinuxVersion["llvm"]![18])
|
||||
expect(getVersion("llvm", "true", [16, 4])).toBe(DefaultLinuxVersion["llvm"]![16])
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -5,13 +5,15 @@ import { isArch } from "../utils/env/isArch"
|
|||
|
||||
function getLLVMDefault() {
|
||||
switch (process.platform) {
|
||||
case "win32":
|
||||
return "16.0.6"
|
||||
case "linux":
|
||||
// used for non-ubuntu (Fedora, Arch)
|
||||
return "15.0.6-ubuntu-18.04"
|
||||
return "16.0.4-ubuntu-22.04"
|
||||
case "darwin":
|
||||
return "15.0.3"
|
||||
default:
|
||||
return "15.0.4"
|
||||
return "16.0.6"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,22 +54,22 @@ export const DefaultLinuxVersion: Record<string, Record<number, string> | undefi
|
|||
20: "7.0.0-2",
|
||||
},
|
||||
llvm: {
|
||||
22: "15.0.6-ubuntu-18.04",
|
||||
20: "15.0.6-ubuntu-18.04",
|
||||
22: "16.0.4-ubuntu-22.04",
|
||||
20: "16.0.4-ubuntu-22.04",
|
||||
18: "15.0.6-ubuntu-18.04",
|
||||
16: "15.0.6-ubuntu-18.04",
|
||||
14: "13.0.0-ubuntu-16.04",
|
||||
},
|
||||
clangtidy: {
|
||||
22: "15.0.6-ubuntu-18.04",
|
||||
20: "15.0.6-ubuntu-18.04",
|
||||
22: "16.0.4-ubuntu-22.04",
|
||||
20: "16.0.4-ubuntu-22.04",
|
||||
18: "15.0.6-ubuntu-18.04",
|
||||
16: "15.0.6-ubuntu-18.04",
|
||||
14: "13.0.0-ubuntu-16.04",
|
||||
},
|
||||
clangformat: {
|
||||
22: "15.0.6-ubuntu-18.04",
|
||||
20: "15.0.6-ubuntu-18.04",
|
||||
22: "16.0.4-ubuntu-22.04",
|
||||
20: "16.0.4-ubuntu-22.04",
|
||||
18: "15.0.6-ubuntu-18.04",
|
||||
16: "15.0.6-ubuntu-18.04",
|
||||
14: "13.0.0-ubuntu-16.04",
|
||||
|
|
Loading…
Reference in New Issue