From c790d0e5390fe695fbf06cbf929793515ace3c4e Mon Sep 17 00:00:00 2001 From: Sebastian-Webster <84299475+Sebastian-Webster@users.noreply.github.com> Date: Thu, 13 Feb 2025 23:53:11 +0400 Subject: [PATCH 1/4] add Ubuntu 22.04 and 24.04 ARM tests --- .github/workflows/os-compatibility.yml | 2 +- src/libraries/Version.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/os-compatibility.yml b/.github/workflows/os-compatibility.yml index 2cb44263..e258de29 100644 --- a/.github/workflows/os-compatibility.yml +++ b/.github/workflows/os-compatibility.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-13, macos-14, macos-15, ubuntu-22.04, ubuntu-24.04, windows-2019, windows-2022] + os: [macos-13, macos-14, macos-15, ubuntu-22.04, ubuntu-24.04, windows-2019, windows-2022, ubuntu-22.04-arm, ubuntu-24.04-arm] #There is no 10.0.0 at the time of writing, but since greater than characters are not allowed in GitHub Actions artifacts names, 9.0.1 - 10.0.0 will be used instead of >9.0.0 version-requirement: ['5.7.19 - 5.7.24', '5.7.25 - 5.7.29', '5.7.30 - 5.7.34', '5.7.35 - 5.7.39', '5.7.40 - 5.7.44', '8.0.0 - 8.0.4', '8.0.4 - 8.0.13', '8.0.14 - 8.0.19', '8.0.20 - 8.0.24', '8.0.25 - 8.0.29', '8.0.30 - 8.0.34', '8.0.35 - 8.0.39', '8.0.40 - 8.3.0', '8.4.0 - 9.0.0', '9.0.1 - 10.0.0'] diff --git a/src/libraries/Version.ts b/src/libraries/Version.ts index a1f5d356..a516b2b1 100644 --- a/src/libraries/Version.ts +++ b/src/libraries/Version.ts @@ -101,7 +101,7 @@ export default function getBinaryURL(versionToGet: string = "x", currentArch: st const fileExtensionKey = fileExtensionKeys.find(range => satisfies(selectedVersion, range)) const fileExtension = MYSQL_LINUX_FILE_EXTENSIONS[fileExtensionKey] - fileLocation = `${major(selectedVersion)}.${minor(selectedVersion)}/mysql-${selectedVersion}${isRC ? '-rc' : isDMR ? '-dmr' : ''}-linux-${minimalInstallAvailable !== 'no-glibc-tag' ? `glibc${glibcVersion}-` : ''}${currentArch === 'x64' ? 'x86_64' : 'arm64'}${minimalInstallAvailable !== 'no' ? `-minimal${satisfies(selectedVersion, MYSQL_LINUX_MINIMAL_REBUILD_VERSIONS) ? '-rebuild' : ''}` : ''}.tar.${fileExtension}` + fileLocation = `${major(selectedVersion)}.${minor(selectedVersion)}/mysql-${selectedVersion}${isRC ? '-rc' : isDMR ? '-dmr' : ''}-linux-${minimalInstallAvailable !== 'no-glibc-tag' ? `glibc${glibcVersion}-` : ''}${currentArch === 'x64' ? 'x86_64' : 'aarch64'}${minimalInstallAvailable !== 'no' ? `-minimal${satisfies(selectedVersion, MYSQL_LINUX_MINIMAL_REBUILD_VERSIONS) ? '-rebuild' : ''}` : ''}.tar.${fileExtension}` } return { From 7d066362ecab557ea93ce25778dad0345e3f6db4 Mon Sep 17 00:00:00 2001 From: Sebastian-Webster <84299475+Sebastian-Webster@users.noreply.github.com> Date: Thu, 13 Feb 2025 23:57:14 +0400 Subject: [PATCH 2/4] do not use minimal install on Linux ARM for MySQL versions 8.0.31 & 8.0.32 --- src/constants.ts | 1 + src/libraries/Version.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 9cb50332..26d2f834 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -188,6 +188,7 @@ export const MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE = { '8.0.16 - 8.0.20': 'no-glibc-tag', '8.0.21 - 9.2.0': 'glibc-tag' } as const; +export const MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE_ARM64 = '>=8.0.33' export const MYSQL_LINUX_FILE_EXTENSIONS = { '5.7.19 - 8.0.11': 'gz', '8.0.12 - 9.2.0': 'xz' diff --git a/src/libraries/Version.ts b/src/libraries/Version.ts index a516b2b1..12d4e0ad 100644 --- a/src/libraries/Version.ts +++ b/src/libraries/Version.ts @@ -1,7 +1,7 @@ import { BinaryInfo, JSRuntimeVersion } from "../../types"; import * as os from 'os' import { satisfies, coerce, lt, major, minor } from "semver"; -import { archiveBaseURL, DMR_MYSQL_VERSIONS, DOWNLOADABLE_MYSQL_VERSIONS, MYSQL_ARCH_SUPPORT, MYSQL_LINUX_FILE_EXTENSIONS, MYSQL_LINUX_GLIBC_VERSIONS, MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE, MYSQL_MACOS_VERSIONS_IN_FILENAME, MYSQL_MIN_OS_SUPPORT, RC_MYSQL_VERSIONS, MYSQL_LINUX_MINIMAL_REBUILD_VERSIONS } from "../constants"; +import { archiveBaseURL, DMR_MYSQL_VERSIONS, DOWNLOADABLE_MYSQL_VERSIONS, MYSQL_ARCH_SUPPORT, MYSQL_LINUX_FILE_EXTENSIONS, MYSQL_LINUX_GLIBC_VERSIONS, MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE, MYSQL_MACOS_VERSIONS_IN_FILENAME, MYSQL_MIN_OS_SUPPORT, RC_MYSQL_VERSIONS, MYSQL_LINUX_MINIMAL_REBUILD_VERSIONS, MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE_ARM64 } from "../constants"; import etcOSRelease from "./LinuxOSRelease"; export default function getBinaryURL(versionToGet: string = "x", currentArch: string): BinaryInfo { @@ -101,7 +101,7 @@ export default function getBinaryURL(versionToGet: string = "x", currentArch: st const fileExtensionKey = fileExtensionKeys.find(range => satisfies(selectedVersion, range)) const fileExtension = MYSQL_LINUX_FILE_EXTENSIONS[fileExtensionKey] - fileLocation = `${major(selectedVersion)}.${minor(selectedVersion)}/mysql-${selectedVersion}${isRC ? '-rc' : isDMR ? '-dmr' : ''}-linux-${minimalInstallAvailable !== 'no-glibc-tag' ? `glibc${glibcVersion}-` : ''}${currentArch === 'x64' ? 'x86_64' : 'aarch64'}${minimalInstallAvailable !== 'no' ? `-minimal${satisfies(selectedVersion, MYSQL_LINUX_MINIMAL_REBUILD_VERSIONS) ? '-rebuild' : ''}` : ''}.tar.${fileExtension}` + fileLocation = `${major(selectedVersion)}.${minor(selectedVersion)}/mysql-${selectedVersion}${isRC ? '-rc' : isDMR ? '-dmr' : ''}-linux-${minimalInstallAvailable !== 'no-glibc-tag' ? `glibc${glibcVersion}-` : ''}${currentArch === 'x64' ? 'x86_64' : 'aarch64'}${minimalInstallAvailable !== 'no' && (process.arch !== 'arm64' ? true : satisfies(selectedVersion, MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE_ARM64)) ? `-minimal${satisfies(selectedVersion, MYSQL_LINUX_MINIMAL_REBUILD_VERSIONS) ? '-rebuild' : ''}` : ''}.tar.${fileExtension}` } return { From df4e7261cdd1ece19634a58ff149685f039fc33b Mon Sep 17 00:00:00 2001 From: Sebastian-Webster <84299475+Sebastian-Webster@users.noreply.github.com> Date: Fri, 14 Feb 2025 01:36:51 +0400 Subject: [PATCH 3/4] change file extension for versions 8.0.31 - 8.0.32 --- src/constants.ts | 10 ++++++++-- src/libraries/Version.ts | 5 +++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 26d2f834..a8734b13 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -190,7 +190,13 @@ export const MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE = { } as const; export const MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE_ARM64 = '>=8.0.33' export const MYSQL_LINUX_FILE_EXTENSIONS = { - '5.7.19 - 8.0.11': 'gz', - '8.0.12 - 9.2.0': 'xz' + x64: { + '5.7.19 - 8.0.11': 'gz', + '8.0.12 - 9.2.0': 'xz' + }, + arm64: { + '8.0.31 - 8.0.32': 'gz', + '8.0.33 - 9.2.0': 'xz' + } } as const; export const MYSQL_LINUX_MINIMAL_REBUILD_VERSIONS = '8.0.26'; \ No newline at end of file diff --git a/src/libraries/Version.ts b/src/libraries/Version.ts index 12d4e0ad..04f92be1 100644 --- a/src/libraries/Version.ts +++ b/src/libraries/Version.ts @@ -97,9 +97,10 @@ export default function getBinaryURL(versionToGet: string = "x", currentArch: st const minimalInstallAvailableKey = minimalInstallAvailableKeys.find(range => satisfies(selectedVersion, range)) const minimalInstallAvailable = MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE[minimalInstallAvailableKey] - const fileExtensionKeys = Object.keys(MYSQL_LINUX_FILE_EXTENSIONS); + const fileExtensionObject = MYSQL_LINUX_FILE_EXTENSIONS[currentArch] + const fileExtensionKeys = Object.keys(fileExtensionObject); const fileExtensionKey = fileExtensionKeys.find(range => satisfies(selectedVersion, range)) - const fileExtension = MYSQL_LINUX_FILE_EXTENSIONS[fileExtensionKey] + const fileExtension = MYSQL_LINUX_FILE_EXTENSIONS[currentArch][fileExtensionKey] fileLocation = `${major(selectedVersion)}.${minor(selectedVersion)}/mysql-${selectedVersion}${isRC ? '-rc' : isDMR ? '-dmr' : ''}-linux-${minimalInstallAvailable !== 'no-glibc-tag' ? `glibc${glibcVersion}-` : ''}${currentArch === 'x64' ? 'x86_64' : 'aarch64'}${minimalInstallAvailable !== 'no' && (process.arch !== 'arm64' ? true : satisfies(selectedVersion, MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE_ARM64)) ? `-minimal${satisfies(selectedVersion, MYSQL_LINUX_MINIMAL_REBUILD_VERSIONS) ? '-rebuild' : ''}` : ''}.tar.${fileExtension}` } From 4619a77ba296dec469230971de3a45abb26071f1 Mon Sep 17 00:00:00 2001 From: Sebastian-Webster <84299475+Sebastian-Webster@users.noreply.github.com> Date: Fri, 14 Feb 2025 01:40:40 +0400 Subject: [PATCH 4/4] add architecture used for os tests in docs --- docs/SUPPORTED_MYSQL_DOWNLOADS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/SUPPORTED_MYSQL_DOWNLOADS.md b/docs/SUPPORTED_MYSQL_DOWNLOADS.md index 0e0c7b52..9df41507 100644 --- a/docs/SUPPORTED_MYSQL_DOWNLOADS.md +++ b/docs/SUPPORTED_MYSQL_DOWNLOADS.md @@ -8,7 +8,7 @@ - Windows - Linux -*```mysql-memory-server``` gets tested on Ubuntu 22.04 and 24.04, Fedora 40 and 41, macOS 13, 14, and 15, and Windows Server 2019 and 2022. Linux distributions and Windows and macOS versions other than the ones tested may or may not work and are not guaranteed to work with this package.* +*```mysql-memory-server``` gets tested on Ubuntu 22.04 (x64 and arm64) and 24.04 (x64 and arm64), Fedora 40 (x64) and 41 (x64), macOS 13 (x64), 14 (arm64), and 15 (arm64), and Windows Server 2019 (x64) and 2022 (x64). Linux distributions and Windows and macOS versions other than the ones tested may or may not work and are not guaranteed to work with this package.* ## Binaries not available for download