mirror of https://github.com/aminya/setup-cpp
feat: default to llvm 15
This commit is contained in:
parent
cd3be8a4d2
commit
79523d501b
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -124,26 +124,6 @@ describe("setup-llvm", () => {
|
||||||
await testBin("clang-format", ["--version"], binDir)
|
await testBin("clang-format", ["--version"], binDir)
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should setup LLVM 15.0.2", async () => {
|
|
||||||
await io.rmRF(directory)
|
|
||||||
await io.rmRF("/Users/runner/hostedtoolcache/llvm")
|
|
||||||
|
|
||||||
const { binDir } = await setupLLVM("15.0.2", directory, process.arch)
|
|
||||||
await testBin("clang++", ["--version"], binDir)
|
|
||||||
|
|
||||||
expect(process.env.CC?.includes("clang")).toBeTruthy()
|
|
||||||
expect(process.env.CXX?.includes("clang++")).toBeTruthy()
|
|
||||||
|
|
||||||
// test compilation
|
|
||||||
const file = path.join(__dirname, "main.cpp")
|
|
||||||
const main_exe = path.join(__dirname, addExeExt("main"))
|
|
||||||
execa.sync("clang++", [file, "-o", main_exe], { cwd: __dirname })
|
|
||||||
if (process.platform !== "win32") {
|
|
||||||
chmodSync(main_exe, "755")
|
|
||||||
}
|
|
||||||
execa.sync(main_exe, { cwd: __dirname, stdio: "inherit" })
|
|
||||||
})
|
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
await io.rmRF(directory)
|
await io.rmRF(directory)
|
||||||
}, 100000)
|
}, 100000)
|
||||||
|
|
|
@ -4,9 +4,9 @@ import { isArch } from "../utils/env/isArch"
|
||||||
// the directly downloaded tools require a given version ("" doesn't work).
|
// the directly downloaded tools require a given version ("" doesn't work).
|
||||||
|
|
||||||
export const DefaultVersions: Record<string, string> = {
|
export const DefaultVersions: Record<string, string> = {
|
||||||
llvm: "13.0.0", // https://github.com/llvm/llvm-project/releases
|
llvm: "15.0.4", // https://github.com/llvm/llvm-project/releases
|
||||||
clangtidy: "13.0.0",
|
clangtidy: "15.0.4",
|
||||||
clangformat: "13.0.0",
|
clangformat: "15.0.4",
|
||||||
ninja: "1.11.1", // https://github.com/ninja-build/ninja/releases
|
ninja: "1.11.1", // https://github.com/ninja-build/ninja/releases
|
||||||
cmake: "3.25.0", // https://github.com/Kitware/CMake/releases
|
cmake: "3.25.0", // https://github.com/Kitware/CMake/releases
|
||||||
gcovr: "5.2", // https://pypi.org/project/gcovr/
|
gcovr: "5.2", // https://pypi.org/project/gcovr/
|
||||||
|
@ -30,24 +30,24 @@ export const DefaultLinuxVersion: Record<string, Record<number, string>> = {
|
||||||
14: "11",
|
14: "11",
|
||||||
},
|
},
|
||||||
llvm: {
|
llvm: {
|
||||||
22: "13.0.0-ubuntu-20.04",
|
22: "15.0.6-ubuntu-18.0.4",
|
||||||
20: "13.0.0-ubuntu-20.04",
|
20: "15.0.6-ubuntu-18.0.4",
|
||||||
18: "13.0.1-ubuntu-18.04",
|
18: "15.0.6-ubuntu-18.0.4",
|
||||||
16: "13.0.0-ubuntu-16.04",
|
16: "15.0.6-ubuntu-18.0.4",
|
||||||
14: "13.0.0-ubuntu-16.04",
|
14: "13.0.0-ubuntu-16.04",
|
||||||
},
|
},
|
||||||
clangtidy: {
|
clangtidy: {
|
||||||
22: "13.0.0-ubuntu-20.04",
|
22: "15.0.6-ubuntu-18.0.4",
|
||||||
20: "13.0.0-ubuntu-20.04",
|
20: "15.0.6-ubuntu-18.0.4",
|
||||||
18: "13.0.1-ubuntu-18.04",
|
18: "15.0.6-ubuntu-18.0.4",
|
||||||
16: "13.0.0-ubuntu-16.04",
|
16: "15.0.6-ubuntu-18.0.4",
|
||||||
14: "13.0.0-ubuntu-16.04",
|
14: "13.0.0-ubuntu-16.04",
|
||||||
},
|
},
|
||||||
clangformat: {
|
clangformat: {
|
||||||
22: "13.0.0-ubuntu-20.04",
|
22: "15.0.6-ubuntu-18.0.4",
|
||||||
20: "13.0.0-ubuntu-20.04",
|
20: "15.0.6-ubuntu-18.0.4",
|
||||||
18: "13.0.1-ubuntu-18.04",
|
18: "15.0.6-ubuntu-18.0.4",
|
||||||
16: "13.0.0-ubuntu-16.04",
|
16: "15.0.6-ubuntu-18.0.4",
|
||||||
14: "13.0.0-ubuntu-16.04",
|
14: "13.0.0-ubuntu-16.04",
|
||||||
},
|
},
|
||||||
gcovr: {
|
gcovr: {
|
||||||
|
|
Loading…
Reference in New Issue