From bd986bff40089a47d2fb378ab9ba6ea248fac61f Mon Sep 17 00:00:00 2001 From: "lvfei.lv" Date: Thu, 15 Aug 2024 17:00:16 +0800 Subject: [PATCH] [Misc] Build Jtreg using JDK on aach64 runners Summary: When the cache fails to be retrieved, the JDK used for the build is forcibly set to the x64 JDK, which can cause problems in the aarch64 runners. Testing: CI pipline Reviewers: lei.yul, sendaoYan Issue: https://github.com/dragonwell-project/dragonwell11/issues/858 --- .github/actions/get-jtreg/action.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/get-jtreg/action.yml b/.github/actions/get-jtreg/action.yml index ab0927919db..03617e5fdb0 100644 --- a/.github/actions/get-jtreg/action.yml +++ b/.github/actions/get-jtreg/action.yml @@ -57,7 +57,12 @@ runs: - name: 'Build JTReg' run: | # Build JTReg and move files to the proper locations - bash make/build.sh --jdk "$JAVA_HOME_11_X64" + if [ -n "$JAVA_HOME_11_X64" ]; then + jdk=$JAVA_HOME_11_X64 + else + jdk=$(dirname $(dirname $(readlink -f `which java`))) + fi + bash make/build.sh --jdk "$jdk" mkdir ../installed mv build/images/jtreg/* ../installed working-directory: jtreg/src