mirror of https://github.com/aminya/setup-cpp
fix: use the cmake install path as the kcov bin path
This commit is contained in:
parent
43d199d290
commit
45eb099dc6
|
@ -6,8 +6,8 @@ import { info } from "@actions/core"
|
|||
|
||||
jest.setTimeout(300000)
|
||||
describe("setup-Kcov", () => {
|
||||
if (process.platform === "win32") {
|
||||
it.todo("should setup kcov on windows")
|
||||
if (process.platform !== "win32") {
|
||||
it.todo("should setup kcov on non-Windows")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -59,12 +59,12 @@ async function buildKcov(file: string, dest: string) {
|
|||
await execa("cmake", ["-S", "./", "-B", "./build"], { cwd: out, stdio: "inherit" })
|
||||
await execa("cmake", ["--build", "./build", "--config", "Release"], { cwd: out, stdio: "inherit" })
|
||||
execSudo("cmake", ["--install", "./build"], out)
|
||||
return out
|
||||
return "user/local/bin" // the cmake install prefix
|
||||
}
|
||||
|
||||
export async function setupKcov(versionGiven: string, setupDir: string, arch: string) {
|
||||
if (process.platform === "win32") {
|
||||
info("Kcov is not supported on Windows")
|
||||
if (process.platform !== "win32") {
|
||||
info("Kcov is not supported on non-linux")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ export async function setupBin(
|
|||
const downloaded = await downloadTool(url)
|
||||
await extractFunction?.(downloaded, setupDir)
|
||||
} catch (err) {
|
||||
throw new Error(`Failed to download ${name} ${version} ${arch}: ${err}`)
|
||||
throw new Error(`Failed to download ${name} ${version} ${arch} from ${url}: ${err}`)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue