Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/os-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down
2 changes: 1 addition & 1 deletion docs/SUPPORTED_MYSQL_DOWNLOADS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 9 additions & 2 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
9 changes: 5 additions & 4 deletions src/libraries/Version.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
Loading