diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..78cca16 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,24 @@ +name: Build JDK for ARM + +on: [push] + +jobs: + build: + runs-on: ubuntu-18.04 + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: Build with CI build script + run: ./ci_build.sh + + - name: Upload build output + uses: actions/upload-artifact@v1 + with: + name: jre + path: jre.tar.xz diff --git a/buildjdk.sh b/buildjdk.sh index 36c93e3..fead3ad 100755 --- a/buildjdk.sh +++ b/buildjdk.sh @@ -5,7 +5,11 @@ export FREETYPE_DIR=`pwd`/freetype-2.6.2/build_android-arm export CUPS_DIR=`pwd`/cups-2.2.4 # My system's JDK is too old (7.0), so we add an Oracle boot JDK. -export PATH=`pwd`/jdk1.8.0_162/bin:$PATH +# Set "USE_SYSTEM_JDK_8=1" to use system jdk instead +if [ -z "$USE_SYSTEM_JDK_8" ] +then + export PATH=`pwd`/jdk1.8.0_162/bin:$PATH +fi cd openjdk rm -rf build diff --git a/ci_build.sh b/ci_build.sh new file mode 100755 index 0000000..22b0837 --- /dev/null +++ b/ci_build.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -e +# We have OpenJDK 8, good enough +export USE_SYSTEM_JDK_8=1 +wget -nv -O android-ndk-r10e-linux-x86_64.zip "https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip" +./extractndk.sh +./getlibs.sh +./maketoolchain.sh +./clonejdk.sh +./buildlibs.sh +./buildjdk.sh +./removejdkdebuginfo.sh +./tarjdk.sh