diff --git a/src/default_versions.ts b/src/default_versions.ts index 57eb8083..338b1db6 100644 --- a/src/default_versions.ts +++ b/src/default_versions.ts @@ -7,7 +7,7 @@ const DefaultVersions: Record = { 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 */ diff --git a/src/gcc/__tests__/gcc.test.ts b/src/gcc/__tests__/gcc.test.ts index ac50d04b..727248eb 100644 --- a/src/gcc/__tests__/gcc.test.ts +++ b/src/gcc/__tests__/gcc.test.ts @@ -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) })