test: disable linux llvm cache

This commit is contained in:
Amin Yahyaabadi 2022-05-05 20:30:11 -07:00
parent 20cc86b4f6
commit 22d47d9d3f
1 changed files with 9 additions and 5 deletions

View File

@ -79,7 +79,8 @@ describe("setup-llvm", () => {
})
it("should setup LLVM", async () => {
const { binDir } = await setupLLVM(getVersion("llvm", "true", await ubuntuVersion()), directory, process.arch)
const osVersion = await ubuntuVersion()
const { binDir } = await setupLLVM(getVersion("llvm", "true", osVersion), directory, process.arch)
await testBin("clang++", ["--version"], binDir)
expect(process.env.CC?.includes("clang")).toBeTruthy()
@ -96,24 +97,27 @@ describe("setup-llvm", () => {
})
it("should find llvm in the cache", async () => {
const { binDir } = await setupLLVM(getVersion("llvm", "true", await ubuntuVersion()), directory, process.arch)
const osVersion = await ubuntuVersion()
const { binDir } = await setupLLVM(getVersion("llvm", "true", osVersion), directory, process.arch)
await testBin("clang++", ["--version"], binDir)
if (isGitHubCI()) {
if (isGitHubCI() && process.platform !== "linux") {
expect(binDir).toMatch(process.env.RUNNER_TOOL_CACHE ?? "hostedtoolcache")
// TODO returns the install dir on linux
}
expect(process.env.CC?.includes("clang")).toBeTruthy()
expect(process.env.CXX?.includes("clang++")).toBeTruthy()
if (isGitHubCI()) {
if (isGitHubCI() && process.platform !== "linux") {
expect(process.env.CC).toMatch("hostedtoolcache")
expect(process.env.CXX).toMatch("hostedtoolcache")
}
})
it("should setup clang-tidy and clang-format", async () => {
const { binDir } = await setupClangTools(getVersion("llvm", "true", await ubuntuVersion()), directory, process.arch)
const osVersion = await ubuntuVersion()
const { binDir } = await setupClangTools(getVersion("llvm", "true", osVersion), directory, process.arch)
await testBin("clang-tidy", ["--version"], binDir)
await testBin("clang-format", ["--version"], binDir)
})