Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Arm64 builds for macos support #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
26 changes: 22 additions & 4 deletions .github/workflows/testing-mysql-server-8.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Java Maven Build
name: Build and Test

on:
push:
Expand All @@ -10,7 +10,7 @@ jobs:
build:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
os: [ubuntu-22.04, ubuntu-24.04, macos-latest]
fail-fast: false
runs-on: ${{ matrix.os }}

Expand All @@ -24,10 +24,28 @@ jobs:
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
distribution: 'corretto'
cache: 'maven'
- name: Set up Homebrew
if: matrix.os == 'macos-latest'
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install GNU binutils
if: matrix.os == 'macos-latest'
run: |
brew install binutils
brew install patchelf
echo /opt/homebrew/opt/binutils/bin >> $GITHUB_PATH
- name: Install libaio-dev
if: matrix.os != 'macos-latest'
run: |
sudo apt-get install -y libaio-dev
- name: Cache mysql downloads
uses: actions/cache@v4
with:
path: testing-mysql-server-8/dist
key: mysql-downloads-${{ hashFiles('**/repack-mysql-8.sh') }}
- name: Run Maven install
run: ./mvnw -B --no-transfer-progress clean install -pl testing-mysql-server-8 -am
run: |
echo $PATH
./mvnw -B --no-transfer-progress clean install -pl testing-mysql-server-8 -am
8 changes: 4 additions & 4 deletions testing-mysql-server-8/repack-mysql-8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ VERSION=8.4.3
BASEURL="https://dev.mysql.com/get/Downloads/MySQL-8.4"

LINUX_BASE=mysql-$VERSION-linux-glibc2.28-x86_64
MACOS_BASE=mysql-$VERSION-macos14-x86_64
MACOS_BASE=mysql-$VERSION-macos14-arm64

TAR=tar
command -v gtar >/dev/null && TAR=gtar
Expand All @@ -29,12 +29,12 @@ then
exit 100
fi

PATCHELF=PATCHELF
PATCHELF=patchelf
command -v patchelf >/dev/null && PATCHELF=patchelf

set -x

cd $(dirname $0)
cd "$(dirname $0)"

RESOURCES=target/generated-resources

Expand Down Expand Up @@ -107,5 +107,5 @@ function pack_linux() {
rm -rf $PACKDIR
}

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