Skip to content

Commit 31c48bc

Browse files
committed
Use Arm64 builds for macos support
The last mac to be sold with x86_64 architecture was the Mac Pro in 2019. While MacOS may support x86_64 until ~2027, I think we should be safe to swap the x86_64 support to ARM64 in this library.
1 parent 36775c1 commit 31c48bc

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

Diff for: .github/workflows/testing-mysql-server-8.yml

+17-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Java Maven Build
1+
name: Build and Test
22

33
on:
44
push:
@@ -10,7 +10,7 @@ jobs:
1010
build:
1111
strategy:
1212
matrix:
13-
os: [ubuntu-22.04, ubuntu-24.04]
13+
os: [ubuntu-22.04, ubuntu-24.04, macos-14]
1414
fail-fast: false
1515
runs-on: ${{ matrix.os }}
1616

@@ -24,10 +24,23 @@ jobs:
2424
uses: actions/setup-java@v4
2525
with:
2626
java-version: '8'
27-
distribution: 'temurin'
27+
distribution: 'corretto'
2828
cache: 'maven'
29+
- name: Set up Homebrew
30+
if: matrix.os == 'macos-14'
31+
id: set-up-homebrew
32+
uses: Homebrew/actions/setup-homebrew@master
33+
- name: Install GNU binutils
34+
if: matrix.os == 'macos-14'
35+
run: |
36+
brew install binutils
37+
brew install patchelf
38+
echo /opt/homebrew/opt/binutils/bin >> $GITHUB_PATH
2939
- name: Install libaio-dev
40+
if: matrix.os != 'macos-14'
3041
run: |
3142
sudo apt-get install -y libaio-dev
3243
- name: Run Maven install
33-
run: ./mvnw -B --no-transfer-progress clean install -pl testing-mysql-server-8 -am
44+
run: |
45+
echo $PATH
46+
./mvnw -B --no-transfer-progress clean install -pl testing-mysql-server-8 -am

Diff for: testing-mysql-server-8/repack-mysql-8.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ VERSION=8.4.3
66
BASEURL="https://dev.mysql.com/get/Downloads/MySQL-8.4"
77

88
LINUX_BASE=mysql-$VERSION-linux-glibc2.28-x86_64
9-
MACOS_BASE=mysql-$VERSION-macos14-x86_64
9+
MACOS_BASE=mysql-$VERSION-macos14-arm64
1010

1111
TAR=tar
1212
command -v gtar >/dev/null && TAR=gtar
@@ -29,12 +29,12 @@ then
2929
exit 100
3030
fi
3131

32-
PATCHELF=PATCHELF
32+
PATCHELF=patchelf
3333
command -v patchelf >/dev/null && PATCHELF=patchelf
3434

3535
set -x
3636

37-
cd $(dirname $0)
37+
cd "$(dirname $0)"
3838

3939
RESOURCES=target/generated-resources
4040

@@ -107,5 +107,5 @@ function pack_linux() {
107107
rm -rf $PACKDIR
108108
}
109109

110-
test -e $RESOURCES/mysql-Mac_OS_X-amd64.tar.gz || pack_macos $MACOS_DIST $MACOS_BASE mysql-Mac_OS_X-amd64.tar.gz
110+
test -e $RESOURCES/mysql-Mac_OS-aarch64.tar.gz || pack_macos $MACOS_DIST $MACOS_BASE mysql-Mac_OS-aarch64.tar.gz
111111
test -e $RESOURCES/mysql-Linux-amd64.tar.gz || pack_linux $LINUX_DIST $LINUX_BASE mysql-Linux-amd64.tar.gz

0 commit comments

Comments
 (0)