Skip to content

Commit

Permalink
Merge pull request #21 from zakkak/2024-08-29-use-openjdk
Browse files Browse the repository at this point in the history
Switch gates to use OpenJDK EA builds instead of LabsJDK
  • Loading branch information
zakkak authored Aug 30, 2024
2 parents 722c5d5 + 4b3435c commit 4e4feb7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 14 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,16 @@ jobs:
path: ~/.mx
key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }}
restore-keys: ${{ runner.os }}-mx-
- name: Fetch LabsJDK
- name: Get OpenJDK with static libs
env: ${{ matrix.env }}
run: |
mkdir jdk-dl
${MX_PATH}/mx --java-home= fetch-jdk --jdk-id labsjdk-ce-${JDK_VERSION} --to jdk-dl --alias ${JAVA_HOME}
curl -sL https://api.adoptium.net/v3/binary/latest/${JDK_VERSION}/ea/linux/x64/jdk/hotspot/normal/eclipse -o jdk.tar.gz
curl -sL https://api.adoptium.net/v3/binary/latest/${JDK_VERSION}/ea/linux/x64/staticlibs/hotspot/normal/eclipse -o jdk-static-libs.tar.gz
mkdir -p ${JAVA_HOME}
tar xf jdk.tar.gz -C ${JAVA_HOME} --strip-components=1
tar xf jdk-static-libs.tar.gz -C ${JAVA_HOME} --strip-components=1
echo ${JAVA_HOME}
${JAVA_HOME}/bin/java --version
- name: Update dependency cache
if: ${{ env.MX_RUNS_DEBUG == 'true' || env.MX_RUNS_STYLE == 'true' }}
run: sudo apt update
Expand Down
32 changes: 21 additions & 11 deletions .github/workflows/quarkus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ env:
DB_PASSWORD: hibernate_orm_test
DB_USER: hibernate_orm_test
GRAALVM_HOME: ${{ github.workspace }}/graalvm
LABSJDK_HOME: ${{ github.workspace }}/jdk
BOOTSTRAP_JAVA_HOME: ${{ github.workspace }}/jdk
LANG: en_US.UTF-8 # Workaround testsuite locale issue
MX_GIT_CACHE: refcache
MX_PATH: ${{ github.workspace }}/mx
MX_PYTHON: python3.8
NATIVE_TEST_MAVEN_ARGS: "-Dtest-containers -Dstart-containers -Dquarkus.native.native-image-xmx=5g -Dnative -Dnative.surefire.skip -Dformat.skip -Dno-descriptor-tests install -DskipDocs -Dquarkus.native.container-build=false"
QUARKUS_PATH: ${{ github.workspace }}/quarkus
JDK_VERSION: "21"

permissions: {}
jobs:
Expand Down Expand Up @@ -69,16 +70,20 @@ jobs:
key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }}
restore-keys: |
${{ runner.os }}-mx-
- name: Fetch LabsJDK
- name: Get OpenJDK with static libs
run: |
mkdir jdk-dl
${MX_PATH}/mx --java-home= fetch-jdk --jdk-id labsjdk-ce-21 --to jdk-dl --alias ${LABSJDK_HOME}
curl -sL https://api.adoptium.net/v3/binary/latest/${JDK_VERSION}/ea/linux/x64/jdk/hotspot/normal/eclipse -o jdk.tar.gz
curl -sL https://api.adoptium.net/v3/binary/latest/${JDK_VERSION}/ea/linux/x64/staticlibs/hotspot/normal/eclipse -o jdk-static-libs.tar.gz
mkdir -p ${BOOTSTRAP_JAVA_HOME}
tar xf jdk.tar.gz -C ${BOOTSTRAP_JAVA_HOME} --strip-components=1
tar xf jdk-static-libs.tar.gz -C ${BOOTSTRAP_JAVA_HOME} --strip-components=1
echo ${BOOTSTRAP_JAVA_HOME}
${BOOTSTRAP_JAVA_HOME}/bin/java --version
- name: Build graalvm native-image
run: |
export JAVA_HOME=${LABSJDK_HOME}
cd substratevm
${MX_PATH}/mx --native=native-image,lib:jvmcicompiler --components="Native Image,LibGraal" build
mv $(${MX_PATH}/mx --native=native-image,lib:jvmcicompiler --components="Native Image,LibGraal" graalvm-home) ${GRAALVM_HOME}
${MX_PATH}/mx --java-home=${BOOTSTRAP_JAVA_HOME} --native=native-image,lib:jvmcicompiler --components="Native Image,LibGraal" build
mv $(${MX_PATH}/mx --java-home=${BOOTSTRAP_JAVA_HOME} --native=native-image,lib:jvmcicompiler --components="Native Image,LibGraal" graalvm-home) ${GRAALVM_HOME}
${GRAALVM_HOME}/bin/native-image --version
- name: Tar GraalVM
shell: bash
Expand All @@ -88,6 +93,11 @@ jobs:
with:
name: graalvm
path: graalvm.tgz
- name: Use JDK 17 for Quarkus build
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Build Quarkus
run: |
cd ${QUARKUS_PATH}
Expand Down Expand Up @@ -149,11 +159,11 @@ jobs:
if: startsWith(matrix.os-name, 'ubuntu')
shell: bash
run: tar -xzf maven-repo.tgz -C ~
- uses: graalvm/setup-graalvm@v1
- name: Use JDK 17 for Quarkus build
uses: actions/setup-java@v4
with:
version: 'latest'
java-version: '17'
github-token: ${{ secrets.GITHUB_TOKEN }}
distribution: temurin
java-version: 17
- name: Build with Maven
if: startsWith(matrix.os-name, 'ubuntu')
env:
Expand Down

0 comments on commit 4e4feb7

Please sign in to comment.