fix: use gcc 10 on windows

This commit is contained in:
Amin Yahyaabadi 2021-09-16 18:21:11 -05:00
parent 7c06eab367
commit 24734937d9
2 changed files with 5 additions and 3 deletions

View File

@ -7,7 +7,7 @@ const DefaultVersions: Record<string, string> = {
conan: "1.40.1",
meson: "0.59.1",
python: "3.x",
gcc: "11",
gcc: process.platform === "win32" ? "10.2.0" : "11",
}
/** Get the default version if passed true or undefined, otherwise return the version itself */

View File

@ -1,14 +1,16 @@
import { testBin } from "../../utils/tests/test-helpers"
import { setupGcc } from "../gcc"
import { getVersion } from "../../default_versions"
jest.setTimeout(200000)
describe("setup-gcc", () => {
it("should setup gcc", async () => {
const installInfo = await setupGcc("11", "", process.arch)
const version = getVersion("gcc", undefined) ?? "11"
const installInfo = await setupGcc(version, "", process.arch)
let gpp = "g++"
if (process.platform !== "win32") {
gpp = "g++-11"
gpp = `g++-${version}`
}
await testBin(gpp, ["--version"], installInfo?.binDir)
})