mirror of
https://github.com/AngelAuraMC/angelauramc-openjdk-build.git
synced 2025-08-03 23:55:58 -04:00
build: docker jre21 compat, CI updated for both 21 and 17
This commit is contained in:
parent
7fc629ab1c
commit
75de467a28
72
.github/workflows/build.yml
vendored
72
.github/workflows/build.yml
vendored
@ -12,42 +12,54 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
arch: ["aarch32", "aarch64", "x86", "x86_64"]
|
arch: ["aarch32", "aarch64", "x86", "x86_64"]
|
||||||
|
version: [17, 21]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
||||||
name: "Build for Android ${{matrix.arch}}"
|
name: "Build Java ${{ matrix.version }} for Android ${{matrix.arch}}"
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: set up JDK 1.17
|
|
||||||
|
- name: set up JDK 1.${{ matrix.version }}
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: 17
|
java-version: ${{ matrix.version }}
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
|
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt -y install autoconf python3 python-is-python3 unzip zip systemtap-sdt-dev libxtst-dev libasound2-dev libelf-dev libfontconfig1-dev libx11-dev libxext-dev libxrandr-dev libxrender-dev libxtst-dev libxt-dev
|
sudo apt -y install autoconf python3 python-is-python3 unzip zip systemtap-sdt-dev libxtst-dev libasound2-dev libelf-dev libfontconfig1-dev libx11-dev libxext-dev libxrandr-dev libxrender-dev libxtst-dev libxt-dev
|
||||||
|
|
||||||
- name: Build with CI build script
|
- name: Build with CI build script
|
||||||
run: bash "1_ci_build_arch_${{matrix.arch}}.sh"
|
run: export TARGET_VERSION=${{ matrix.version }} && bash "1_ci_build_arch_${{matrix.arch}}.sh"
|
||||||
|
|
||||||
- name: Upload JDK build output
|
- name: Upload JDK build output
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: "jdk17-${{matrix.arch}}"
|
name: "jdk${{ matrix.version }}-${{matrix.arch}}"
|
||||||
path: jdk17*.tar.xz
|
path: jdk${{ matrix.version }}*.tar.xz
|
||||||
|
|
||||||
- name: Upload JRE build output
|
- name: Upload JRE build output
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: "jre17-${{matrix.arch}}"
|
name: "jre${{ matrix.version }}-${{matrix.arch}}"
|
||||||
path: jre17*.tar.xz
|
path: jre${{ matrix.version }}*.tar.xz
|
||||||
|
|
||||||
- name: Upload JRE debuginfo build output
|
- name: Upload JRE debuginfo build output
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: "jre17-debuginfo-${{matrix.arch}}"
|
name: "jre${{ matrix.version }}-debuginfo-${{matrix.arch}}"
|
||||||
path: dizout
|
path: dizout
|
||||||
|
|
||||||
build_iosport:
|
build_iosport:
|
||||||
name: "Build for iOS aarch64"
|
strategy:
|
||||||
|
matrix:
|
||||||
|
version: [17, 21]
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
name: "Build Java ${{ matrix.version }} for iOS aarch64"
|
||||||
runs-on: MacStadium
|
runs-on: MacStadium
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
steps:
|
steps:
|
||||||
@ -57,7 +69,7 @@ jobs:
|
|||||||
- name: Build with CI build script
|
- name: Build with CI build script
|
||||||
run: |
|
run: |
|
||||||
export PATH=/opt/procursus/bin:/opt/homebrew/bin:$PATH
|
export PATH=/opt/procursus/bin:/opt/homebrew/bin:$PATH
|
||||||
export JAVA_HOME=$(/usr/libexec/java_home -v 17)
|
export JAVA_HOME=$(/usr/libexec/java_home -v ${{ matrix.version }})
|
||||||
export BUILD_IOS=1
|
export BUILD_IOS=1
|
||||||
bash "1_ci_build_arch_aarch64.sh"
|
bash "1_ci_build_arch_aarch64.sh"
|
||||||
|
|
||||||
@ -70,45 +82,55 @@ jobs:
|
|||||||
- name: Upload JRE build output
|
- name: Upload JRE build output
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: "jre17-ios-aarch64"
|
name: "jre${{ matrix.version }}-ios-aarch64"
|
||||||
path: jre17*.tar.xz
|
path: jre${{ matrix.version }}*.tar.xz
|
||||||
|
|
||||||
- name: Upload JRE debuginfo build output
|
- name: Upload JRE debuginfo build output
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: "jre17-ios-debuginfo-aarch64"
|
name: "jre${{ matrix.version }}-ios-debuginfo-aarch64"
|
||||||
path: dizout
|
path: dizout
|
||||||
|
|
||||||
pojav:
|
pojav:
|
||||||
needs: build_android
|
needs: build_android
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
version: [17, 21]
|
||||||
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Get jre17-aarch32
|
|
||||||
|
- name: Get jre${{ matrix.version }}-aarch32
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: jre17-aarch32
|
name: jre${{ matrix.version }}-aarch32
|
||||||
path: pojav
|
path: pojav
|
||||||
- name: Get jre17-aarch64
|
|
||||||
|
- name: Get jre${{ matrix.version }}-aarch64
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: jre17-aarch64
|
name: jre${{ matrix.version }}-aarch64
|
||||||
path: pojav
|
path: pojav
|
||||||
- name: Get jre17-x86
|
|
||||||
|
- name: Get jre${{ matrix.version }}-x86
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: jre17-x86
|
name: jre${{ matrix.version }}-x86
|
||||||
path: pojav
|
path: pojav
|
||||||
- name: Get jre17-x86_64
|
|
||||||
|
- name: Get jre${{ matrix.version }}-x86_64
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: jre17-x86_64
|
name: jre${{ matrix.version }}-x86_64
|
||||||
path: pojav
|
path: pojav
|
||||||
|
|
||||||
- name: Repack JRE
|
- name: Repack JRE
|
||||||
run: bash "9_repackjre.sh" $GITHUB_WORKSPACE/pojav $GITHUB_WORKSPACE/pojav/jre17-pojav
|
run: bash "9_repackjre.sh" $GITHUB_WORKSPACE/pojav $GITHUB_WORKSPACE/pojav/jre${{ matrix.version }}-pojav
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: jre17-pojav
|
name: jre${{ matrix.version }}-pojav
|
||||||
path: pojav/jre17-pojav/*
|
path: pojav/jre${{ matrix.version }}-pojav/*
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -6,6 +6,8 @@ dummy_libs
|
|||||||
freetype-*-x86
|
freetype-*-x86
|
||||||
jdk1.8.0_*
|
jdk1.8.0_*
|
||||||
openjdk
|
openjdk
|
||||||
|
openjdk-17
|
||||||
|
openjdk-21
|
||||||
android-ndk-r*
|
android-ndk-r*
|
||||||
jre.tar.xz
|
jre.tar.xz
|
||||||
jreout
|
jreout
|
||||||
|
@ -21,8 +21,11 @@ fi
|
|||||||
|
|
||||||
# Some modifies to NDK to fix
|
# Some modifies to NDK to fix
|
||||||
|
|
||||||
|
# Only build the sources if they are not already present
|
||||||
|
if [ ! -d "cups-2.2.4" ]; then
|
||||||
./3_getlibs.sh
|
./3_getlibs.sh
|
||||||
./4_buildlibs.sh
|
./4_buildlibs.sh
|
||||||
|
fi
|
||||||
./5_clonejdk.sh
|
./5_clonejdk.sh
|
||||||
./6_buildjdk.sh
|
./6_buildjdk.sh
|
||||||
./7_removejdkdebuginfo.sh
|
./7_removejdkdebuginfo.sh
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
git clone --depth 1 https://github.com/openjdk/jdk17u openjdk
|
if [[ $TARGET_VERSION -eq 21 ]]; then
|
||||||
|
git clone --branch jdk21.0.1 --depth 1 https://github.com/openjdk/jdk21u openjdk-21
|
||||||
|
else
|
||||||
|
git clone --depth 1 https://github.com/openjdk/jdk17u openjdk-17
|
||||||
|
fi
|
@ -75,14 +75,14 @@ fi
|
|||||||
# fix building libjawt
|
# fix building libjawt
|
||||||
ln -s -f $CUPS_DIR/cups $ANDROID_INCLUDE/
|
ln -s -f $CUPS_DIR/cups $ANDROID_INCLUDE/
|
||||||
|
|
||||||
cd openjdk
|
cd openjdk-${TARGET_VERSION}
|
||||||
|
|
||||||
# Apply patches
|
# Apply patches
|
||||||
git reset --hard
|
git reset --hard
|
||||||
if [[ "$BUILD_IOS" != "1" ]]; then
|
if [[ "$BUILD_IOS" != "1" ]]; then
|
||||||
find ../patches/jre_17/android -name "*.diff" -print0 | xargs -0 -I {} sh -c 'echo "Applying {}" && git apply {} && || echo "git apply failed (Android patch set)"'
|
find ../patches/jre_${TARGET_VERSION}/android -name "*.diff" -print0 | xargs -0 -I {} sh -c 'echo "Applying {}" && git apply --reject --whitespace=fix {} || echo "git apply failed (Android patch set)"'
|
||||||
else
|
else
|
||||||
find ../patches/jre_17/ios -name "*.diff" -print0 | xargs -0 -I {} sh -c 'echo "Applying {}" && git apply {} && || echo "git apply failed (iOs patch set)"'
|
find ../patches/jre_${TARGET_VERSION}/ios -name "*.diff" -print0 | xargs -0 -I {} sh -c 'echo "Applying {}" && git apply --reject --whitespace=fix {} && || echo "git apply failed (iOs patch set)"'
|
||||||
|
|
||||||
# Hack: exclude building macOS stuff
|
# Hack: exclude building macOS stuff
|
||||||
desktop_mac=src/java.desktop/macosx
|
desktop_mac=src/java.desktop/macosx
|
||||||
|
@ -3,7 +3,7 @@ set -e
|
|||||||
|
|
||||||
. setdevkitpath.sh
|
. setdevkitpath.sh
|
||||||
|
|
||||||
imagespath=openjdk/build/${JVM_PLATFORM}-${TARGET_JDK}-${JVM_VARIANTS}-${JDK_DEBUG_LEVEL}/images
|
imagespath=openjdk-${TARGET_VERSION}/build/${JVM_PLATFORM}-${TARGET_JDK}-${JVM_VARIANTS}-${JDK_DEBUG_LEVEL}/images
|
||||||
|
|
||||||
rm -rf dizout jreout jdkout dSYM-temp
|
rm -rf dizout jreout jdkout dSYM-temp
|
||||||
mkdir -p dizout dSYM-temp/{lib,bin}
|
mkdir -p dizout dSYM-temp/{lib,bin}
|
||||||
|
@ -36,8 +36,13 @@ cd jreout
|
|||||||
# Strip in place all .so files thanks to the ndk
|
# Strip in place all .so files thanks to the ndk
|
||||||
find ./ -name '*.so' -execdir ${TOOLCHAIN}/bin/llvm-strip {} \;
|
find ./ -name '*.so' -execdir ${TOOLCHAIN}/bin/llvm-strip {} \;
|
||||||
|
|
||||||
tar cJf ../jre17-${TARGET_SHORT}-`date +%Y%m%d`-${JDK_DEBUG_LEVEL}.tar.xz .
|
|
||||||
|
tar cJf ../jre${TARGET_VERSION}-${TARGET_SHORT}-`date +%Y%m%d`-${JDK_DEBUG_LEVEL}.tar.xz .
|
||||||
|
|
||||||
cd ../jdkout
|
cd ../jdkout
|
||||||
tar cJf ../jdk17-${TARGET_SHORT}-`date +%Y%m%d`-${JDK_DEBUG_LEVEL}.tar.xz .
|
tar cJf ../jdk${TARGET_VERSION}-${TARGET_SHORT}-`date +%Y%m%d`-${JDK_DEBUG_LEVEL}.tar.xz .
|
||||||
|
|
||||||
|
# Remove jreout and jdkout
|
||||||
|
cd ..
|
||||||
|
rm -rf jreout jdkout
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@ RUN apt-get install -y \
|
|||||||
libxtst-dev \
|
libxtst-dev \
|
||||||
libxt-dev \
|
libxt-dev \
|
||||||
wget \
|
wget \
|
||||||
|
gcc \
|
||||||
|
g++ \
|
||||||
clang \
|
clang \
|
||||||
git \
|
git \
|
||||||
file \
|
file \
|
||||||
@ -31,6 +33,7 @@ RUN apt-get install -y \
|
|||||||
|
|
||||||
# JDK 17
|
# JDK 17
|
||||||
RUN apt-get install -y openjdk-17-jdk
|
RUN apt-get install -y openjdk-17-jdk
|
||||||
|
RUN apt-get install -y openjdk-21-jdk
|
||||||
|
|
||||||
WORKDIR /home
|
WORKDIR /home
|
||||||
|
|
||||||
@ -44,6 +47,4 @@ RUN \
|
|||||||
&& rm android-ndk-$NDK_VERSION-linux-x86_64.zip
|
&& rm android-ndk-$NDK_VERSION-linux-x86_64.zip
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
@ -6,5 +6,5 @@ set -e
|
|||||||
export FREETYPE_DIR=`pwd`/freetype-${BUILD_FREETYPE_VERSION}/build_android-${TARGET_SHORT}
|
export FREETYPE_DIR=`pwd`/freetype-${BUILD_FREETYPE_VERSION}/build_android-${TARGET_SHORT}
|
||||||
export CUPS_DIR=`pwd`/cups-2.2.4
|
export CUPS_DIR=`pwd`/cups-2.2.4
|
||||||
|
|
||||||
cd openjdk/build/${JVM_PLATFORM}-${TARGET_JDK}-${JVM_VARIANTS}-release
|
cd openjdk-${TARGET_VERSION}/build/${JVM_PLATFORM}-${TARGET_JDK}-${JVM_VARIANTS}-release
|
||||||
make JOBS=4 images
|
make JOBS=4 images
|
||||||
|
2499
patches/jre_21/android/jdk21u_android.diff
Normal file
2499
patches/jre_21/android/jdk21u_android.diff
Normal file
File diff suppressed because it is too large
Load Diff
3303
patches/jre_21/ios/jdk21u_ios.diff
Normal file
3303
patches/jre_21/ios/jdk21u_ios.diff
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,15 @@
|
|||||||
# Use the old NDK r10e to not get internal compile error at (still?)
|
# Description: Set the environment variables for the build scripts.
|
||||||
# https://github.com/PojavLauncherTeam/openjdk-multiarch-jdk8u/blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.c
|
|
||||||
export NDK_VERSION=r25c
|
export NDK_VERSION=r25c
|
||||||
|
|
||||||
|
# Target version is either 17 or 21
|
||||||
|
if [[ -z "$TARGET_VERSION" ]]
|
||||||
|
then
|
||||||
|
export TARGET_VERSION=21
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set custom java version as the defautl jdk depending on the target version
|
||||||
|
update-java-alternatives -s java-1.${TARGET_VERSION}*
|
||||||
|
|
||||||
if [[ -z "$BUILD_FREETYPE_VERSION" ]]
|
if [[ -z "$BUILD_FREETYPE_VERSION" ]]
|
||||||
then
|
then
|
||||||
export BUILD_FREETYPE_VERSION="2.10.0"
|
export BUILD_FREETYPE_VERSION="2.10.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user