Skip to content

Commit

Permalink
CI: Use JDK 17 instead of 11
Browse files Browse the repository at this point in the history
  • Loading branch information
zakkak committed Mar 13, 2023
1 parent 19ff4d2 commit 03cc9ab
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/buildJDK.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ jobs:
key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }}
restore-keys: |
${{ runner.os }}-${{ matrix.quarkus-name }}-maven-
- name: Get latest openJDK11 with static libs
- name: Get latest openJDK17 with static libs
run: |
curl -sL https://api.adoptium.net/v3/binary/latest/11/ea/linux/x64/jdk/hotspot/normal/eclipse -o jdk.tar.gz
curl -sL https://api.adoptium.net/v3/binary/latest/11/ea/linux/x64/staticlibs/hotspot/normal/eclipse -o jdk-static-libs.tar.gz
curl -sL https://api.adoptium.net/v3/binary/latest/17/ea/linux/x64/jdk/hotspot/normal/eclipse -o jdk.tar.gz
curl -sL https://api.adoptium.net/v3/binary/latest/17/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
Expand All @@ -80,12 +80,12 @@ jobs:
run: |
${JAVA_HOME}/bin/java -ea build.java --verbose --mx-home ${MX_HOME} --mandrel-repo ${MANDREL_REPO} --mandrel-version "${MANDREL_VERSION}" --archive-suffix tar.gz
export MANDREL_VERSION_UNTIL_SPACE="$( echo ${MANDREL_VERSION} | sed -e 's/\([^ ]*\).*/\1/;t' )"
export ARCHIVE_NAME="mandrel-java11-linux-amd64-${MANDREL_VERSION_UNTIL_SPACE}.tar.gz"
mv ${ARCHIVE_NAME} mandrel-java11-linux-amd64.tar.gz
export ARCHIVE_NAME="mandrel-java17-linux-amd64-${MANDREL_VERSION_UNTIL_SPACE}.tar.gz"
mv ${ARCHIVE_NAME} mandrel-java17-linux-amd64.tar.gz
- name: Smoke tests
run: |
export MANDREL_VERSION_UNTIL_SPACE="$( echo ${MANDREL_VERSION} | sed -e 's/\([^ ]*\).*/\1/;t' )"
export MANDREL_HOME=${PWD}/mandrel-java11-${MANDREL_VERSION_UNTIL_SPACE}
export MANDREL_HOME=${PWD}/mandrel-java17-${MANDREL_VERSION_UNTIL_SPACE}
${MANDREL_HOME}/bin/native-image --version
${MANDREL_HOME}/bin/native-image --version | grep "${MANDREL_VERSION}"
echo "
Expand All @@ -109,20 +109,20 @@ jobs:
- name: Upload Mandrel build
uses: actions/upload-artifact@v1
with:
name: mandrel-java11-linux-amd64-test-build
path: mandrel-java11-linux-amd64.tar.gz
name: mandrel-java17-linux-amd64-test-build
path: mandrel-java17-linux-amd64.tar.gz
- name: Build Mandrel JDK with tarxz suffix
run: |
git -C ${MANDREL_REPO} checkout .
${JAVA_HOME}/bin/java -ea build.java --mx-home ${MX_HOME} --mandrel-repo ${MANDREL_REPO} --mandrel-version "${MANDREL_VERSION}" --archive-suffix tarxz --skip-clean --skip-java --skip-native
export MANDREL_VERSION_UNTIL_SPACE="$( echo ${MANDREL_VERSION} | sed -e 's/\([^ ]*\).*/\1/;t' )"
export ARCHIVE_NAME="mandrel-java11-linux-amd64-${MANDREL_VERSION_UNTIL_SPACE}.tarxz"
mv ${ARCHIVE_NAME} mandrel-java11-linux-amd64.tarxz
export ARCHIVE_NAME="mandrel-java17-linux-amd64-${MANDREL_VERSION_UNTIL_SPACE}.tarxz"
mv ${ARCHIVE_NAME} mandrel-java17-linux-amd64.tarxz
- name: Upload tarxz Mandrel build
uses: actions/upload-artifact@v1
with:
name: mandrel-java11-linux-amd64-test-build-tarxz
path: mandrel-java11-linux-amd64.tarxz
name: mandrel-java17-linux-amd64-test-build-tarxz
path: mandrel-java17-linux-amd64.tarxz

build-and-test-on-windows:
name: Windows Build and test ${{ matrix.mandrel-ref }} branch/tag
Expand Down Expand Up @@ -157,13 +157,13 @@ jobs:
key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }}
restore-keys: |
${{ runner.os }}-${{ matrix.quarkus-name }}-maven-
- name: Get latest openJDK11 with static libs
- name: Get latest openJDK17 with static libs
run: |
$wc = New-Object System.Net.WebClient
$wc.DownloadFile("https://api.adoptium.net/v3/binary/latest/11/ea/windows/x64/jdk/hotspot/normal/eclipse", "$Env:temp\jdk.zip")
$wc.DownloadFile("https://api.adoptium.net/v3/binary/latest/17/ea/windows/x64/jdk/hotspot/normal/eclipse", "$Env:temp\jdk.zip")
Expand-Archive "$Env:temp\jdk.zip" -DestinationPath "$Env:temp"
Move-Item -Path "$Env:temp\jdk-*" -Destination $Env:JAVA_HOME
$wc.DownloadFile("https://api.adoptium.net/v3/binary/latest/11/ea/windows/x64/staticlibs/hotspot/normal/eclipse", "$Env:temp\jdk-staticlibs.zip")
$wc.DownloadFile("https://api.adoptium.net/v3/binary/latest/17/ea/windows/x64/staticlibs/hotspot/normal/eclipse", "$Env:temp\jdk-staticlibs.zip")
Expand-Archive "$Env:temp\jdk-staticlibs.zip" -DestinationPath "$Env:temp"
Move-Item -Path "$Env:temp\jdk-*\lib\static" -Destination $Env:JAVA_HOME\lib\
Remove-Item -Recurse "$Env:temp\jdk-*"
Expand Down Expand Up @@ -191,7 +191,7 @@ jobs:
}
}
$MANDREL_VERSION_UNTIL_SPACE=$Env:MANDREL_VERSION -replace "^(.*?) .*$","`$1"
$MANDREL_HOME=".\mandrel-java11-$MANDREL_VERSION_UNTIL_SPACE"
$MANDREL_HOME=".\mandrel-java17-$MANDREL_VERSION_UNTIL_SPACE"
$VERSION=(& $MANDREL_HOME\bin\native-image.cmd --version)
Write-Host $VERSION
if ("$VERSION" -NotMatch "$Env:MANDREL_VERSION") {
Expand Down Expand Up @@ -223,13 +223,13 @@ jobs:
shell: bash
run: |
export MANDREL_VERSION_UNTIL_SPACE="$( echo ${MANDREL_VERSION} | sed -e 's/\([^ ]*\).*/\1/;t' )"
export ARCHIVE_NAME="mandrel-java11-windows-amd64-${MANDREL_VERSION_UNTIL_SPACE}.zip"
mv ${ARCHIVE_NAME} mandrel-java11-windows-amd64.zip
export ARCHIVE_NAME="mandrel-java17-windows-amd64-${MANDREL_VERSION_UNTIL_SPACE}.zip"
mv ${ARCHIVE_NAME} mandrel-java17-windows-amd64.zip
- name: Upload Mandrel build
uses: actions/upload-artifact@v1
with:
name: mandrel-java11-windows-amd64-test-build
path: mandrel-java11-windows-amd64.zip
name: mandrel-java17-windows-amd64-test-build
path: mandrel-java17-windows-amd64.zip

build-and-test-2-step:
name: 2-step Linux Build and test ${{ matrix.mandrel-ref }} branch/tag
Expand Down Expand Up @@ -264,10 +264,10 @@ jobs:
key: ${{ runner.os }}-mx-${{ hashFiles('**/suite.py') }}
restore-keys: |
${{ runner.os }}-${{ matrix.quarkus-name }}-maven-
- name: Get latest openJDK11 with static libs
- name: Get latest openJDK17 with static libs
run: |
curl -sL https://api.adoptium.net/v3/binary/latest/11/ea/linux/x64/jdk/hotspot/normal/eclipse -o jdk.tar.gz
curl -sL https://api.adoptium.net/v3/binary/latest/11/ea/linux/x64/staticlibs/hotspot/normal/eclipse -o jdk-static-libs.tar.gz
curl -sL https://api.adoptium.net/v3/binary/latest/17/ea/linux/x64/jdk/hotspot/normal/eclipse -o jdk.tar.gz
curl -sL https://api.adoptium.net/v3/binary/latest/17/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
Expand Down Expand Up @@ -298,12 +298,12 @@ jobs:
--skip-java \
--archive-suffix tar.gz
export MANDREL_VERSION_UNTIL_SPACE="$( echo ${MANDREL_VERSION} | sed -e 's/\([^ ]*\).*/\1/;t' )"
export ARCHIVE_NAME="mandrel-java11-linux-amd64-${MANDREL_VERSION_UNTIL_SPACE}.tar.gz"
mv ${ARCHIVE_NAME} mandrel-java11-linux-amd64.tar.gz
export ARCHIVE_NAME="mandrel-java17-linux-amd64-${MANDREL_VERSION_UNTIL_SPACE}.tar.gz"
mv ${ARCHIVE_NAME} mandrel-java17-linux-amd64.tar.gz
- name: Smoke tests
run: |
export MANDREL_VERSION_UNTIL_SPACE="$( echo ${MANDREL_VERSION} | sed -e 's/\([^ ]*\).*/\1/;t' )"
export MANDREL_HOME=${PWD}/mandrel-java11-${MANDREL_VERSION_UNTIL_SPACE}
export MANDREL_HOME=${PWD}/mandrel-java17-${MANDREL_VERSION_UNTIL_SPACE}
${MANDREL_HOME}/bin/native-image --version
${MANDREL_HOME}/bin/native-image --version | grep "${MANDREL_VERSION}"
echo "
Expand All @@ -327,5 +327,5 @@ jobs:
- name: Upload Mandrel build
uses: actions/upload-artifact@v1
with:
name: mandrel-java11-linux-amd64-2step-test-build
path: mandrel-java11-linux-amd64.tar.gz
name: mandrel-java17-linux-amd64-2step-test-build
path: mandrel-java17-linux-amd64.tar.gz

0 comments on commit 03cc9ab

Please sign in to comment.