mirror of https://github.com/aminya/setup-cpp
fix: rename the cache folder to hostedtoolcache
This commit is contained in:
parent
f9ff833979
commit
05211426be
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -17,7 +17,7 @@ describe("setup-cmake", () => {
|
||||||
it("should find CMake in the cache", async () => {
|
it("should find CMake in the cache", async () => {
|
||||||
const { binDir } = await setupCmake("3.20.2", directory, process.arch)
|
const { binDir } = await setupCmake("3.20.2", directory, process.arch)
|
||||||
await testBin("cmake", ["--version"], binDir)
|
await testBin("cmake", ["--version"], binDir)
|
||||||
expect(binDir.includes("ToolCache")).toBeTruthy()
|
expect(binDir.includes("hostedtoolcache")).toBeTruthy()
|
||||||
})
|
})
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
|
|
|
@ -31,7 +31,7 @@ describe("setup-Kcov", () => {
|
||||||
// it("should find Kcov in the cache", async () => {
|
// it("should find Kcov in the cache", async () => {
|
||||||
// const directory = await setupTmpDir("kcov-v39")
|
// const directory = await setupTmpDir("kcov-v39")
|
||||||
// const binDir = await testKcov("v39", directory)
|
// const binDir = await testKcov("v39", directory)
|
||||||
// expect(binDir.includes("ToolCache")).toBeTruthy()
|
// expect(binDir.includes("hostedtoolcache")).toBeTruthy()
|
||||||
// await cleanupTmpDir("kcov-v39")
|
// await cleanupTmpDir("kcov-v39")
|
||||||
// })
|
// })
|
||||||
})
|
})
|
||||||
|
|
|
@ -53,12 +53,12 @@ describe("setup-llvm", () => {
|
||||||
const { binDir } = await setupLLVM("11.0.0", directory, process.arch)
|
const { binDir } = await setupLLVM("11.0.0", directory, process.arch)
|
||||||
await testBin("clang++", ["--version"], binDir)
|
await testBin("clang++", ["--version"], binDir)
|
||||||
|
|
||||||
expect(binDir.includes("ToolCache")).toBeTruthy()
|
expect(binDir.includes("hostedtoolcache")).toBeTruthy()
|
||||||
|
|
||||||
expect(process.env.CC?.includes("clang")).toBeTruthy()
|
expect(process.env.CC?.includes("clang")).toBeTruthy()
|
||||||
expect(process.env.CXX?.includes("clang++")).toBeTruthy()
|
expect(process.env.CXX?.includes("clang++")).toBeTruthy()
|
||||||
expect(process.env.CC?.includes("ToolCache")).toBeTruthy()
|
expect(process.env.CC?.includes("hostedtoolcache")).toBeTruthy()
|
||||||
expect(process.env.CXX?.includes("ToolCache")).toBeTruthy()
|
expect(process.env.CXX?.includes("hostedtoolcache")).toBeTruthy()
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should setup clang-tidy and clang-format", async () => {
|
it("should setup clang-tidy and clang-format", async () => {
|
||||||
|
|
|
@ -20,7 +20,7 @@ describe("setup-ninja", () => {
|
||||||
|
|
||||||
it("should find Ninja in the cache", async () => {
|
it("should find Ninja in the cache", async () => {
|
||||||
const binDir = await testNinja(directory)
|
const binDir = await testNinja(directory)
|
||||||
expect(binDir.includes("ToolCache")).toBeTruthy()
|
expect(binDir.includes("hostedtoolcache")).toBeTruthy()
|
||||||
})
|
})
|
||||||
|
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
|
|
|
@ -17,7 +17,7 @@ describe("setup-task", () => {
|
||||||
|
|
||||||
it("should find task in the cache", async () => {
|
it("should find task in the cache", async () => {
|
||||||
const installInfo = await setupTask("3.10.0", directory, process.arch)
|
const installInfo = await setupTask("3.10.0", directory, process.arch)
|
||||||
expect((installInfo as InstallationInfo | undefined)?.binDir.includes("ToolCache")).toBeTruthy()
|
expect((installInfo as InstallationInfo | undefined)?.binDir.includes("hostedtoolcache")).toBeTruthy()
|
||||||
})
|
})
|
||||||
|
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
|
|
|
@ -46,7 +46,7 @@ export async function setupBin(
|
||||||
arch: string
|
arch: string
|
||||||
): Promise<InstallationInfo> {
|
): Promise<InstallationInfo> {
|
||||||
process.env.RUNNER_TEMP = process.env.RUNNER_TEMP ?? tmpdir()
|
process.env.RUNNER_TEMP = process.env.RUNNER_TEMP ?? tmpdir()
|
||||||
process.env.RUNNER_TOOL_CACHE = process.env.RUNNER_TOOL_CACHE ?? join(tmpdir(), "setup-cpp", "ToolCache")
|
process.env.RUNNER_TOOL_CACHE = process.env.RUNNER_TOOL_CACHE ?? join(tmpdir(), "setup-cpp", "hostedtoolcache")
|
||||||
|
|
||||||
const { url, binRelativeDir, binFileName, extractedFolderName, extractFunction } = await getPackageInfo(
|
const { url, binRelativeDir, binFileName, extractedFolderName, extractFunction } = await getPackageInfo(
|
||||||
version,
|
version,
|
||||||
|
|
Loading…
Reference in New Issue