mirror of https://github.com/aminya/setup-cpp
Merge pull request #191 from aminya/llvm-version [skip ci]
This commit is contained in:
commit
7c677b659a
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 { parseArgs } from "../cli-options"
|
||||||
import { getCompilerInfo } from "../compilers"
|
import { getCompilerInfo } from "../compilers"
|
||||||
import { Inputs } from "../tool"
|
import { Inputs } from "../tool"
|
||||||
|
import { DefaultLinuxVersion } from "../versions/default_versions"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("getCompilerInfo", () => {
|
describe("getCompilerInfo", () => {
|
||||||
|
@ -63,9 +64,9 @@ describe("getVersion", () => {
|
||||||
it("llvm", () => {
|
it("llvm", () => {
|
||||||
expect(getVersion("llvm", "13.0.0")).toBe("13.0.0")
|
expect(getVersion("llvm", "13.0.0")).toBe("13.0.0")
|
||||||
if (process.platform === "linux") {
|
if (process.platform === "linux") {
|
||||||
expect(getVersion("llvm", "true", [20, 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("15.0.6-ubuntu-18.04")
|
expect(getVersion("llvm", "true", [18, 4])).toBe(DefaultLinuxVersion["llvm"]![18])
|
||||||
expect(getVersion("llvm", "true", [16, 4])).toBe("15.0.6-ubuntu-18.04")
|
expect(getVersion("llvm", "true", [16, 4])).toBe(DefaultLinuxVersion["llvm"]![16])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -5,13 +5,15 @@ import { isArch } from "../utils/env/isArch"
|
||||||
|
|
||||||
function getLLVMDefault() {
|
function getLLVMDefault() {
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
|
case "win32":
|
||||||
|
return "16.0.6"
|
||||||
case "linux":
|
case "linux":
|
||||||
// used for non-ubuntu (Fedora, Arch)
|
// used for non-ubuntu (Fedora, Arch)
|
||||||
return "15.0.6-ubuntu-18.04"
|
return "16.0.4-ubuntu-22.04"
|
||||||
case "darwin":
|
case "darwin":
|
||||||
return "15.0.3"
|
return "15.0.3"
|
||||||
default:
|
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",
|
20: "7.0.0-2",
|
||||||
},
|
},
|
||||||
llvm: {
|
llvm: {
|
||||||
22: "15.0.6-ubuntu-18.04",
|
22: "16.0.4-ubuntu-22.04",
|
||||||
20: "15.0.6-ubuntu-18.04",
|
20: "16.0.4-ubuntu-22.04",
|
||||||
18: "15.0.6-ubuntu-18.04",
|
18: "15.0.6-ubuntu-18.04",
|
||||||
16: "15.0.6-ubuntu-18.04",
|
16: "15.0.6-ubuntu-18.04",
|
||||||
14: "13.0.0-ubuntu-16.04",
|
14: "13.0.0-ubuntu-16.04",
|
||||||
},
|
},
|
||||||
clangtidy: {
|
clangtidy: {
|
||||||
22: "15.0.6-ubuntu-18.04",
|
22: "16.0.4-ubuntu-22.04",
|
||||||
20: "15.0.6-ubuntu-18.04",
|
20: "16.0.4-ubuntu-22.04",
|
||||||
18: "15.0.6-ubuntu-18.04",
|
18: "15.0.6-ubuntu-18.04",
|
||||||
16: "15.0.6-ubuntu-18.04",
|
16: "15.0.6-ubuntu-18.04",
|
||||||
14: "13.0.0-ubuntu-16.04",
|
14: "13.0.0-ubuntu-16.04",
|
||||||
},
|
},
|
||||||
clangformat: {
|
clangformat: {
|
||||||
22: "15.0.6-ubuntu-18.04",
|
22: "16.0.4-ubuntu-22.04",
|
||||||
20: "15.0.6-ubuntu-18.04",
|
20: "16.0.4-ubuntu-22.04",
|
||||||
18: "15.0.6-ubuntu-18.04",
|
18: "15.0.6-ubuntu-18.04",
|
||||||
16: "15.0.6-ubuntu-18.04",
|
16: "15.0.6-ubuntu-18.04",
|
||||||
14: "13.0.0-ubuntu-16.04",
|
14: "13.0.0-ubuntu-16.04",
|
||||||
|
|
Loading…
Reference in New Issue