mirror of https://github.com/aminya/setup-cpp
fix: fix recovering llvm from cache
This commit is contained in:
parent
60472486f4
commit
0db19fa5c2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -49,6 +49,18 @@ describe("setup-llvm", () => {
|
||||||
expect(process.env.CXX?.includes("clang++")).toBeTruthy()
|
expect(process.env.CXX?.includes("clang++")).toBeTruthy()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it("should find llvm in the cache", async () => {
|
||||||
|
const { binDir } = await setupLLVM("11.0.0", directory, "")
|
||||||
|
await testBin("clang++", ["--version"], binDir)
|
||||||
|
|
||||||
|
expect(binDir.includes("ToolCache")).toBeTruthy()
|
||||||
|
|
||||||
|
expect(process.env.CC?.includes("clang")).toBeTruthy()
|
||||||
|
expect(process.env.CXX?.includes("clang++")).toBeTruthy()
|
||||||
|
expect(process.env.CC?.includes("ToolCache")).toBeTruthy()
|
||||||
|
expect(process.env.CXX?.includes("ToolCache")).toBeTruthy()
|
||||||
|
})
|
||||||
|
|
||||||
it("should setup clang-tidy and clang-format", async () => {
|
it("should setup clang-tidy and clang-format", async () => {
|
||||||
const { binDir } = await setupClangTools("11.0.0", directory, "")
|
const { binDir } = await setupClangTools("11.0.0", directory, "")
|
||||||
await testBin("clang-tidy", ["--version"], binDir)
|
await testBin("clang-tidy", ["--version"], binDir)
|
||||||
|
|
|
@ -242,7 +242,7 @@ export async function setupLLVM(
|
||||||
_arch: string
|
_arch: string
|
||||||
): Promise<InstallationInfo> {
|
): Promise<InstallationInfo> {
|
||||||
const installationInfo = await setupBin("llvm", version, getLLVMPackageInfo, setupDir)
|
const installationInfo = await setupBin("llvm", version, getLLVMPackageInfo, setupDir)
|
||||||
await activateLLVM(setupDir, version)
|
await activateLLVM(installationInfo.installDir ?? setupDir, version)
|
||||||
return installationInfo
|
return installationInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue