2024-08-16 06:22:07 +08:00
|
|
|
import { isArch } from "../utils/env/isArch.js"
|
2024-09-03 17:41:54 +08:00
|
|
|
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
2022-05-06 09:36:47 +08:00
|
|
|
|
2022-05-26 06:45:24 +08:00
|
|
|
// passing "" to a tool installed by a package manager (apt, brew, choco) will result in the default version of that package manager.
|
|
|
|
// the directly downloaded tools require a given version ("" doesn't work).
|
|
|
|
|
2022-12-07 14:29:32 +08:00
|
|
|
function getLLVMDefault() {
|
|
|
|
switch (process.platform) {
|
2023-09-01 18:52:13 +08:00
|
|
|
case "win32":
|
2024-04-01 13:35:30 +08:00
|
|
|
return "17.0.6"
|
2022-12-07 14:29:32 +08:00
|
|
|
case "linux":
|
|
|
|
// used for non-ubuntu (Fedora, Arch)
|
2024-03-22 02:37:25 +08:00
|
|
|
// the suffixes relate to the suffix in the llvm releases
|
|
|
|
return "17.0.6-ubuntu-22.04"
|
2022-12-07 14:29:32 +08:00
|
|
|
case "darwin":
|
|
|
|
return "15.0.3"
|
|
|
|
default:
|
2024-04-01 13:35:30 +08:00
|
|
|
return "17.0.6"
|
2022-12-07 14:29:32 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-14 15:22:24 +08:00
|
|
|
export const DefaultVersions: Record<string, string | undefined> = {
|
2022-12-07 14:29:32 +08:00
|
|
|
llvm: getLLVMDefault(), // https://github.com/llvm/llvm-project/releases
|
|
|
|
clangtidy: getLLVMDefault(),
|
|
|
|
clangformat: getLLVMDefault(),
|
2024-08-08 07:50:35 +08:00
|
|
|
ninja: "1.12.1", // https://github.com/ninja-build/ninja/releases
|
|
|
|
cmake: "3.30.2", // https://github.com/Kitware/CMake/releases
|
2024-01-22 18:28:55 +08:00
|
|
|
gcovr: "5.2", // "6.0", // https://pypi.org/project/gcovr/
|
2024-08-08 07:50:35 +08:00
|
|
|
conan: "1.64.1", // 2.0.17 // https://github.com/conan-io/conan/releases
|
|
|
|
meson: "1.5.1", // https://github.com/mesonbuild/meson/releases
|
2023-09-04 08:42:40 +08:00
|
|
|
kcov: "42", // https://github.com/SimonKagstrom/kcov/releases
|
2024-08-08 07:50:35 +08:00
|
|
|
task: "3.38.0", // https://github.com/go-task/task/releases
|
2024-08-08 15:49:41 +08:00
|
|
|
doxygen: isArch() ? "1.11.0-4" : "1.11.0", // https://www.doxygen.nl/download.html // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen // https://formulae.brew.sh/formula/doxygen // https://archlinux.org/packages/extra/x86_64/doxygen/
|
2024-09-03 17:41:54 +08:00
|
|
|
gcc: process.platform === "win32"
|
|
|
|
? "13"
|
|
|
|
: undefined, // use the default version on Ubuntu, Fedora, Arch, macOS, etc.
|
|
|
|
// mingw: isArch() ? "12.2.0-1" : "8", // https://archlinux.org/packages/extra/x86_64/mingw-w64-gcc/
|
2024-08-21 07:26:14 +08:00
|
|
|
powershell: "7.4.5", // https://github.com/PowerShell/PowerShell/releases/tag/v7.4.5
|
2023-06-29 08:23:48 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export const MinVersions: Record<string, string | undefined> = {
|
2023-07-16 07:16:34 +08:00
|
|
|
pip: "22.2.0",
|
2023-06-30 04:49:06 +08:00
|
|
|
python: "3.7.9",
|
2021-09-16 19:36:35 +08:00
|
|
|
}
|
|
|
|
|
2022-05-21 11:00:30 +08:00
|
|
|
/// If an ubuntu versions is not in this map:
|
|
|
|
// - the newer ubuntu versions use the first entry (e.g. v20),
|
|
|
|
// - the older ones use ""
|
2023-06-14 15:47:34 +08:00
|
|
|
export const DefaultLinuxVersion: Record<string, Record<number, string> | undefined> = {
|
2024-09-03 17:41:54 +08:00
|
|
|
// https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=mingw-w64
|
2023-07-20 06:26:55 +08:00
|
|
|
mingw: {
|
2024-08-08 07:16:49 +08:00
|
|
|
24: "8.0.0-1",
|
2023-07-20 06:26:55 +08:00
|
|
|
22: "8.0.0-1",
|
|
|
|
20: "7.0.0-2",
|
|
|
|
},
|
2024-03-22 02:37:25 +08:00
|
|
|
// the suffixes relate to the suffix in the llvm releases
|
2022-05-21 11:00:30 +08:00
|
|
|
llvm: {
|
2024-08-08 07:16:49 +08:00
|
|
|
24: "17.0.6-ubuntu-22.04",
|
2024-04-01 13:35:30 +08:00
|
|
|
22: "17.0.6-ubuntu-22.04",
|
|
|
|
20: "17.0.6-ubuntu-22.04",
|
2024-03-22 02:37:25 +08:00
|
|
|
18: "15.0.6-ubuntu-18.04",
|
2022-12-07 13:56:16 +08:00
|
|
|
16: "15.0.6-ubuntu-18.04",
|
2022-05-26 06:45:24 +08:00
|
|
|
14: "13.0.0-ubuntu-16.04",
|
2022-05-21 11:00:30 +08:00
|
|
|
},
|
|
|
|
clangtidy: {
|
2024-08-08 07:16:49 +08:00
|
|
|
24: "17.0.6-ubuntu-22.04",
|
2024-04-01 13:35:30 +08:00
|
|
|
22: "17.0.6-ubuntu-22.04",
|
|
|
|
20: "17.0.6-ubuntu-22.04",
|
2024-03-22 02:37:25 +08:00
|
|
|
18: "15.0.6-ubuntu-18.04",
|
2022-12-07 13:56:16 +08:00
|
|
|
16: "15.0.6-ubuntu-18.04",
|
2022-05-26 06:45:24 +08:00
|
|
|
14: "13.0.0-ubuntu-16.04",
|
2022-05-21 11:00:30 +08:00
|
|
|
},
|
|
|
|
clangformat: {
|
2024-08-08 07:16:49 +08:00
|
|
|
24: "17.0.6-ubuntu-22.04",
|
2024-04-01 13:35:30 +08:00
|
|
|
22: "17.0.6-ubuntu-22.04",
|
|
|
|
20: "17.0.6-ubuntu-22.04",
|
2024-03-22 02:37:25 +08:00
|
|
|
18: "15.0.6-ubuntu-18.04",
|
2022-12-07 13:56:16 +08:00
|
|
|
16: "15.0.6-ubuntu-18.04",
|
2022-05-26 06:45:24 +08:00
|
|
|
14: "13.0.0-ubuntu-16.04",
|
2022-05-21 11:00:30 +08:00
|
|
|
},
|
|
|
|
gcovr: {
|
2024-08-08 07:16:49 +08:00
|
|
|
24: "6.0",
|
2023-09-04 08:42:40 +08:00
|
|
|
22: "6.0",
|
|
|
|
20: "6.0",
|
2022-05-21 11:00:30 +08:00
|
|
|
18: "5.0",
|
|
|
|
},
|
|
|
|
meson: {
|
2024-08-08 07:16:49 +08:00
|
|
|
24: "1.0.0",
|
|
|
|
22: "1.0.0",
|
2023-01-15 17:36:10 +08:00
|
|
|
20: "1.0.0",
|
2022-05-21 11:00:30 +08:00
|
|
|
18: "0.61.4",
|
|
|
|
},
|
2022-07-25 15:40:05 +08:00
|
|
|
nala: {
|
2024-08-08 07:16:49 +08:00
|
|
|
24: "",
|
2022-07-25 15:40:05 +08:00
|
|
|
22: "",
|
|
|
|
21: "legacy",
|
|
|
|
20: "legacy",
|
|
|
|
18: "legacy",
|
|
|
|
16: "legacy",
|
|
|
|
14: "legacy",
|
|
|
|
},
|
2022-07-22 16:06:43 +08:00
|
|
|
kcov: {
|
2024-08-08 07:16:49 +08:00
|
|
|
24: "42-binary",
|
2023-09-04 08:42:40 +08:00
|
|
|
22: "42-binary",
|
2022-07-22 16:06:43 +08:00
|
|
|
20: "40-binary", // https://github.com/SimonKagstrom/kcov/releases
|
|
|
|
18: "40",
|
|
|
|
16: "40",
|
|
|
|
14: "40",
|
|
|
|
},
|
2024-08-08 16:26:46 +08:00
|
|
|
doxygen: {
|
|
|
|
24: "1.11.0",
|
|
|
|
22: "1.11.0",
|
|
|
|
20: "1.10.0",
|
|
|
|
18: "1.10.0",
|
|
|
|
},
|
2022-05-21 11:00:30 +08:00
|
|
|
}
|