Skip to content

Commit

Permalink
Merge pull request #253 from aminya/versions [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya authored Aug 8, 2024
2 parents e0753dd + be629c9 commit 71d2ff1
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 31 deletions.
24 changes: 12 additions & 12 deletions dist/actions/setup-cpp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/actions/setup-cpp.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/legacy/setup-cpp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/legacy/setup-cpp.js.map

Large diffs are not rendered by default.

32 changes: 22 additions & 10 deletions src/llvm/llvm_url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,19 @@ export const VERSIONS: Set<string> = getVersions([
"18.1.0",
"18.1.1",
"18.1.2",
"18.1.3",
"18.1.4",
"18.1.5",
"18.1.6",
"18.1.7",
"18.1.8",
])

/** The LLVM versions that were never released for the Windows platform. */
const WIN32_MISSING: Set<string> = new Set(["10.0.1", "15.0.5", "15.0.6", "17.0.5"])

/** The LLVM versions that were never released for the Darwin platform. */
const DARWIN_MISSING = new Set([
const DARWIN_X64_MISSING = new Set([
"3.5.1",
"3.6.1",
"3.6.2",
Expand All @@ -98,8 +104,6 @@ const DARWIN_MISSING = new Set([
"11.0.1",
"11.1.0",
"12.0.1",
// missing x86_64
// TODO add arm64 support
"15.0.4",
"15.0.5",
"15.0.6",
Expand All @@ -119,6 +123,12 @@ const DARWIN_MISSING = new Set([
"18.1.0",
"18.1.1",
"18.1.2",
"18.1.3",
"18.1.4",
"18.1.5",
"18.1.6",
"18.1.7",
"18.1.8",
])

/**
Expand All @@ -134,7 +144,7 @@ const UBUNTU_RC: Map<string, string> = new Map()
* https://github.com/llvm/llvm-project/releases/tag/llvmorg-14.0.1 or https://releases.llvm.org/14.0.1
*/
// TODO change based on ubuntu version
const UBUNTU_SUFFIX_MAP: { [key: string]: string } = {
const UBUNTU_X64_SUFFIX_MAP: { [key: string]: string } = {
"3.5.0": "-ubuntu-14.04",
"3.5.1": "",
"3.5.2": "-ubuntu-14.04",
Expand Down Expand Up @@ -172,7 +182,6 @@ const UBUNTU_SUFFIX_MAP: { [key: string]: string } = {
"13.0.1": "-ubuntu-18.04",
"13.0.1-ubuntu-18.04": "-ubuntu-18.04",
"14.0.0": "-ubuntu-18.04",
// "14.0.1": "-ubuntu-18.04", // only available for powerpc64le
"15.0.2": "-rhel86",
"15.0.5": "-ubuntu-18.04",
"15.0.6": "-ubuntu-18.04",
Expand All @@ -184,10 +193,13 @@ const UBUNTU_SUFFIX_MAP: { [key: string]: string } = {
"17.0.4": "-ubuntu-22.04",
"17.0.5": "-ubuntu-22.04",
"17.0.6": "-ubuntu-22.04",
"18.1.4": "-ubuntu-18.04",
"18.1.7": "-ubuntu-18.04",
"18.1.8": "-ubuntu-18.04",
}

/** The latest supported LLVM version for the Linux (Ubuntu) platform. */
const MAX_UBUNTU: string = "17.0.6"
const MAX_UBUNTU: string = "18.1.8"

// ================================================
// URL
Expand All @@ -207,7 +219,7 @@ function getReleaseUrl(version: string, prefix: string, suffix: string): string

/** Gets an LLVM download URL for the Darwin platform. */
function getDarwinUrl(version: string): string | null {
if (DARWIN_MISSING.has(version)) {
if (DARWIN_X64_MISSING.has(version)) {
return null
}

Expand Down Expand Up @@ -239,11 +251,11 @@ export function getLinuxUrl(versionGiven: string): string {
}
linuxVersion = version.replace(givenUbuntuVersion, "")
version = getSpecificVersions(VERSIONS, givenUbuntuVersion)[0]
} else if (version !== "" && version in UBUNTU_SUFFIX_MAP) {
linuxVersion = UBUNTU_SUFFIX_MAP[version]
} else if (version !== "" && version in UBUNTU_X64_SUFFIX_MAP) {
linuxVersion = UBUNTU_X64_SUFFIX_MAP[version]
} else {
// default to the maximum version
linuxVersion = UBUNTU_SUFFIX_MAP[MAX_UBUNTU]
linuxVersion = UBUNTU_X64_SUFFIX_MAP[MAX_UBUNTU]
warning(`Falling back to LLVM version ${MAX_UBUNTU} ${linuxVersion} for the Ubuntu.`)
}

Expand Down
18 changes: 12 additions & 6 deletions src/versions/default_versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ export const DefaultVersions: Record<string, string | undefined> = {
llvm: getLLVMDefault(), // https://github.com/llvm/llvm-project/releases
clangtidy: getLLVMDefault(),
clangformat: getLLVMDefault(),
ninja: "1.11.1", // https://github.com/ninja-build/ninja/releases
cmake: "3.28.1", // https://github.com/Kitware/CMake/releases
ninja: "1.12.1", // https://github.com/ninja-build/ninja/releases
cmake: "3.30.2", // https://github.com/Kitware/CMake/releases
gcovr: "5.2", // "6.0", // https://pypi.org/project/gcovr/
conan: "1.62.0", // 2.0.17 // https://github.com/conan-io/conan/releases
meson: "1.3.1", // https://github.com/mesonbuild/meson/releases
conan: "1.64.1", // 2.0.17 // https://github.com/conan-io/conan/releases
meson: "1.5.1", // https://github.com/mesonbuild/meson/releases
kcov: "42", // https://github.com/SimonKagstrom/kcov/releases
task: "3.33.1", // https://github.com/go-task/task/releases
doxygen: isArch() ? "1.10.0-1" : "1.10.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/
task: "3.38.0", // https://github.com/go-task/task/releases
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/
gcc: isArch() ? "13.2.1-3" : "13", // https://github.com/brechtsanders/winlibs_mingw/releases and // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=gcc
// mingw: isArch() ? "12.2.0-1" : "8", // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=mingw-w64 // https://archlinux.org/packages/extra/x86_64/mingw-w64-gcc/
}
Expand Down Expand Up @@ -110,4 +110,10 @@ export const DefaultLinuxVersion: Record<string, Record<number, string> | undefi
16: "40",
14: "40",
},
doxygen: {
24: "1.11.0",
22: "1.11.0",
20: "1.10.0",
18: "1.10.0",
},
}

0 comments on commit 71d2ff1

Please sign in to comment.