Skip to content

Commit fd6d2a6

Browse files
authored
Merge pull request #49 from aminya/defaults [skip ci]
2 parents f97db97 + d10c4e9 commit fd6d2a6

File tree

12 files changed

+44
-30
lines changed

12 files changed

+44
-30
lines changed

dist/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cmake/__tests__/cmake.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { setupCmake } from "../cmake"
22
import { setupTmpDir, cleanupTmpDir, testBin } from "../../utils/tests/test-helpers"
33
import { isGitHubCI } from "../../utils/env/isci"
4+
import { getVersion } from "../../default_versions"
45

56
jest.setTimeout(300000)
67

@@ -11,12 +12,12 @@ describe("setup-cmake", () => {
1112
})
1213

1314
it("should setup CMake", async () => {
14-
const { binDir } = await setupCmake("3.20.2", directory, process.arch)
15+
const { binDir } = await setupCmake(getVersion("cmake", "true"), directory, process.arch)
1516
await testBin("cmake", ["--version"], binDir)
1617
})
1718

1819
it("should find CMake in the cache", async () => {
19-
const { binDir } = await setupCmake("3.20.2", directory, process.arch)
20+
const { binDir } = await setupCmake(getVersion("cmake", "true"), directory, process.arch)
2021
await testBin("cmake", ["--version"], binDir)
2122
if (isGitHubCI()) {
2223
expect(binDir).toMatch(process.env.RUNNER_TOOL_CACHE ?? "hostedtoolcache")

src/conan/__tests__/conan.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { setupConan } from "../conan"
22
import { testBin } from "../../utils/tests/test-helpers"
3+
import { getVersion } from "../../default_versions"
34

45
jest.setTimeout(300000)
56
describe("setup-conan", () => {
67
it("should setup conan", async () => {
7-
const installInfo = await setupConan("", "", process.arch)
8+
const installInfo = await setupConan(getVersion("conan", "true"), "", process.arch)
89

910
await testBin("conan", ["--version"], installInfo.binDir)
1011
})

src/default_versions.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
const DefaultVersions: Record<string, string> = {
2-
llvm: "13.0.0", // https://github.com/llvm/llvm-project/releases
3-
clangtidy: "13.0.0",
4-
clangformat: "13.0.0",
2+
llvm: "14.0.0", // https://github.com/llvm/llvm-project/releases
3+
clangtidy: "14.0.0",
4+
clangformat: "14.0.0",
55
ninja: "1.10.2", // https://github.com/ninja-build/ninja/releases
6-
cmake: "3.22.2", // https://github.com/Kitware/CMake/releases
6+
cmake: "3.23.1", // https://github.com/Kitware/CMake/releases
77
gcovr: "5.0", // https://pypi.org/project/gcovr/
8-
conan: "1.45.0", // https://github.com/conan-io/conan/releases
9-
meson: "0.61.2", // https://github.com/mesonbuild/meson/releases
8+
conan: "1.47.0", // https://github.com/conan-io/conan/releases
9+
meson: "0.61.4", // https://github.com/mesonbuild/meson/releases
1010
python: "3.8.10",
11-
kcov: "39", // https://github.com/SimonKagstrom/kcov/releases
12-
task: "3.11.0", // https://github.com/go-task/task/releases
11+
kcov: "40", // https://github.com/SimonKagstrom/kcov/releases
12+
task: "3.12.0", // https://github.com/go-task/task/releases
1313
doxygen: "1.9.1", // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen
14-
gcc: process.platform === "win32" ? "11.2.0.07112021" : "11",
14+
gcc: process.platform === "win32" ? "11.2.0.07112021" : "11", // https://community.chocolatey.org/packages/mingw#versionhistory and // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=gcc
1515
}
1616

1717
/** Get the default version if passed true or undefined, otherwise return the version itself */

src/gcovr/__tests__/gcovr.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { setupGcovr } from "../gcovr"
22
import { testBin } from "../../utils/tests/test-helpers"
3+
import { getVersion } from "../../default_versions"
34

45
jest.setTimeout(300000)
56
describe("setup-gcovr", () => {
67
it("should setup gcovr", async () => {
7-
const installInfo = await setupGcovr("", "", process.arch)
8+
const installInfo = await setupGcovr(getVersion("gcovr", "true"), "", process.arch)
89
await testBin("gcovr", ["--version"], installInfo.binDir)
910
})
1011
})

src/kcov/__tests__/kcov.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,18 @@ describe("setup-Kcov", () => {
1010
return
1111
}
1212

13-
let directory: string
14-
beforeAll(async () => {
15-
directory = await setupTmpDir("kcov-v39")
13+
it("should setup Kcov v40", async () => {
14+
const directory = await setupTmpDir("kcov-v40")
15+
const { binDir } = (await setupKcov("40", directory, "")) as InstallationInfo
16+
await testBin("kcov", ["--version"], binDir)
17+
await cleanupTmpDir("kcov-v40")
1618
})
1719

1820
it("should setup Kcov v39", async () => {
21+
const directory = await setupTmpDir("kcov-v39")
1922
const { binDir } = (await setupKcov("39", directory, "")) as InstallationInfo
2023
await testBin("kcov", ["--version"], binDir)
24+
await cleanupTmpDir("kcov-v39")
2125
})
2226

2327
// it("should find Kcov in the cache", async () => {
@@ -44,8 +48,4 @@ describe("setup-Kcov", () => {
4448
console.warn(err)
4549
}
4650
})
47-
48-
afterAll(async () => {
49-
await cleanupTmpDir("kcov-v38")
50-
})
5151
})

src/llvm/__tests__/llvm.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import execa from "execa"
77
import path from "path"
88
import { addBinExtension } from "../../utils/extension/extension"
99
import { chmodSync } from "fs"
10+
import { getVersion } from "../../default_versions"
1011

1112
jest.setTimeout(400000)
1213
async function testUrl(version: string) {
@@ -26,6 +27,7 @@ describe("setup-llvm", () => {
2627
it("Finds valid LLVM URLs", async () => {
2728
await Promise.all(
2829
[
30+
// "14.0.1", fails on ubuntu
2931
"14.0.0",
3032
"13.0.0",
3133
"12.0.0",
@@ -49,7 +51,7 @@ describe("setup-llvm", () => {
4951
})
5052

5153
it("should setup LLVM", async () => {
52-
const { binDir } = await setupLLVM("13.0.0", directory, process.arch)
54+
const { binDir } = await setupLLVM(getVersion("llvm", "true"), directory, process.arch)
5355
await testBin("clang++", ["--version"], binDir)
5456

5557
expect(process.env.CC?.includes("clang")).toBeTruthy()
@@ -66,7 +68,7 @@ describe("setup-llvm", () => {
6668
})
6769

6870
it("should find llvm in the cache", async () => {
69-
const { binDir } = await setupLLVM("13.0.0", directory, process.arch)
71+
const { binDir } = await setupLLVM(getVersion("llvm", "true"), directory, process.arch)
7072
await testBin("clang++", ["--version"], binDir)
7173

7274
if (isGitHubCI()) {
@@ -83,7 +85,7 @@ describe("setup-llvm", () => {
8385
})
8486

8587
it("should setup clang-tidy and clang-format", async () => {
86-
const { binDir } = await setupClangTools("13.0.0", directory, process.arch)
88+
const { binDir } = await setupClangTools(getVersion("llvm", "true"), directory, process.arch)
8789
await testBin("clang-tidy", ["--version"], binDir)
8890
await testBin("clang-format", ["--version"], binDir)
8991
})

src/llvm/llvm.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export const VERSIONS: Set<string> = getVersions([
5858
"13.0.0",
5959
"13.0.1",
6060
"14.0.0",
61+
"14.0.1",
6162
])
6263

6364
//================================================
@@ -116,7 +117,11 @@ function getDarwinUrl(version: string): string | null {
116117
*/
117118
const UBUNTU_RC: Map<string, string> = new Map()
118119

119-
/** The (latest) Ubuntu versions for each LLVM version. */
120+
/**
121+
* The (latest) Ubuntu versions for each LLVM version.
122+
*
123+
* https://github.com/llvm/llvm-project/releases/tag/llvmorg-14.0.1 or https://releases.llvm.org/14.0.1
124+
*/
120125
const UBUNTU: { [key: string]: string } = {
121126
"3.5.0": "-ubuntu-14.04",
122127
"3.5.1": "",
@@ -152,6 +157,7 @@ const UBUNTU: { [key: string]: string } = {
152157
"13.0.0": "-ubuntu-20.04",
153158
"13.0.1": "-ubuntu-18.04",
154159
"14.0.0": "-ubuntu-18.04",
160+
// "14.0.1": "-ubuntu-18.04",
155161
}
156162

157163
/** The latest supported LLVM version for the Linux (Ubuntu) platform. */

src/meson/__tests__/meson.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { setupMeson } from "../meson"
22
import { testBin } from "../../utils/tests/test-helpers"
3+
import { getVersion } from "../../default_versions"
34

45
jest.setTimeout(300000)
56
describe("setup-meson", () => {
67
it("should setup meson", async () => {
7-
const installInfo = await setupMeson("", "", process.arch)
8+
const installInfo = await setupMeson(getVersion("meson", "true"), "", process.arch)
89

910
await testBin("meson", ["--version"], installInfo.binDir)
1011
})

src/ninja/__tests__/ninja.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { setupNinja } from "../ninja"
22
import { setupTmpDir, cleanupTmpDir, testBin } from "../../utils/tests/test-helpers"
33
import { isGitHubCI } from "../../utils/env/isci"
4+
import { getVersion } from "../../default_versions"
45

56
jest.setTimeout(300000)
67
async function testNinja(directory: string) {
7-
const { binDir } = await setupNinja("1.10.2", directory, process.arch)
8+
const { binDir } = await setupNinja(getVersion("ninja", "true"), directory, process.arch)
89
await testBin("ninja", ["--version"], binDir)
910
return binDir
1011
}

src/task/__tests__/task.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { setupTask } from "../task"
22
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers"
33
import { isGitHubCI } from "../../utils/env/isci"
4+
import { getVersion } from "../../default_versions"
45

56
jest.setTimeout(300000)
67
describe("setup-task", () => {
@@ -10,13 +11,13 @@ describe("setup-task", () => {
1011
})
1112

1213
it("should setup task", async () => {
13-
const { binDir } = await setupTask("3.10.0", directory, process.arch)
14+
const { binDir } = await setupTask(getVersion("task", "true"), directory, process.arch)
1415

1516
await testBin("task", ["--version"], binDir)
1617
})
1718

1819
it("should find task in the cache", async () => {
19-
const { binDir } = await setupTask("3.10.0", directory, process.arch)
20+
const { binDir } = await setupTask(getVersion("task", "true"), directory, process.arch)
2021
if (isGitHubCI()) {
2122
expect(binDir).toMatch(process.env.RUNNER_TOOL_CACHE ?? "hostedtoolcache")
2223
}

0 commit comments

Comments
 (0)