From 04541bd3e07592db8246b27b9a5a3994a7a132b9 Mon Sep 17 00:00:00 2001 From: Eilionoir Tunnicliff Date: Wed, 17 Aug 2022 14:16:11 -0400 Subject: [PATCH] Switch to M1 runner for iOS builds (JDK 17) (#11) * Use M1 runner for JDK compile * Add homebrew to PATH * Fix freetype library location on Apple Silicon * Fix jre_override copy operation --- .github/workflows/build.yml | 9 +++------ buildjdk.sh | 6 +++++- tarjdk.sh | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2ebe4df..35f26e9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,19 +38,16 @@ jobs: build_iosport: name: "Build for iOS aarch64" - runs-on: macOS-latest + runs-on: MacStadium continue-on-error: true steps: - name: Checkout repository uses: actions/checkout@v2 - - name: set up JDK 1.17 - uses: actions/setup-java@v1 - with: - java-version: 1.17 - - name: Build with CI build script run: | + export PATH=/opt/homebrew/bin:$PATH + export JAVA_HOME=$(/usr/libexec/java_home -v 17) export BUILD_IOS=1 bash "ci_build_arch_aarch64.sh" diff --git a/buildjdk.sh b/buildjdk.sh index 7b097bc..d9000aa 100755 --- a/buildjdk.sh +++ b/buildjdk.sh @@ -46,7 +46,11 @@ if [ "$BUILD_IOS" != "1" ]; then ar cru dummy_libs/libthread_db.a else ln -s -f /opt/X11/include/X11 $ANDROID_INCLUDE/ - ln -s -f /usr/local/include/fontconfig $ANDROID_INCLUDE/ + if [ "$(uname -p)" == "arm" ]; then + ln -s -f /opt/homebrew/include/fontconfig $ANDROID_INCLUDE/ + else + ln -s -f /usr/local/include/fontconfig $ANDROID_INCLUDE/ + fi platform_args="--with-toolchain-type=clang --with-sysroot=$(xcrun --sdk iphoneos --show-sdk-path) \ --with-boot-jdk=$(/usr/libexec/java_home -v 17) \ --with-freetype=bundled \ diff --git a/tarjdk.sh b/tarjdk.sh index e8b9eba..bca1f27 100755 --- a/tarjdk.sh +++ b/tarjdk.sh @@ -27,7 +27,7 @@ findexec jdkout | xargs -- ./termux-elf-cleaner/termux-elf-cleaner fi -cp jre_override/lib/* jreout/lib/ || true +cp -rv jre_override/lib/* jreout/lib/ || true cd jreout tar cJf ../jre17-${TARGET_SHORT}-`date +%Y%m%d`-${JDK_DEBUG_LEVEL}.tar.xz .