diff --git a/.github/workflows/os-compatibility.yml b/.github/workflows/os-compatibility.yml index 2cb4426..e258de2 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/docs/SUPPORTED_MYSQL_DOWNLOADS.md b/docs/SUPPORTED_MYSQL_DOWNLOADS.md index 0e0c7b5..9df4150 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 diff --git a/src/constants.ts b/src/constants.ts index 9cb5033..a8734b1 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -188,8 +188,15 @@ 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' + 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 a1f5d35..04f92be 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 { @@ -97,11 +97,12 @@ 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' : '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' && (process.arch !== 'arm64' ? true : satisfies(selectedVersion, MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE_ARM64)) ? `-minimal${satisfies(selectedVersion, MYSQL_LINUX_MINIMAL_REBUILD_VERSIONS) ? '-rebuild' : ''}` : ''}.tar.${fileExtension}` } return {