Closed vlsi closed 7 months ago
Here's a workaround:
uses: oracle-actions/setup-java@7a0114d66dbd02646abd345c3395b34c148e6126 # v1.3.2
env:
# ARM machines miss JAVA_HOME_17_X64, however, the action uses the variable
JAVA_HOME_17_X64: ${{ env.JAVA_HOME_17_ARM64 || env.JAVA_HOME_17_X64 }}
Note that JAVA_HOME_17_ARM64
is not reliable.
setup-java
creates variable JAVA_HOME_17_ARM64
when called without explicit architecture: ...
, and it creates JAVA_HOME_17_AARCH64
when architecture: aarch64
is specified in action call 🤷
With setup-java creates variable [...]
you refer to the underlying actions/setup-java
right?
By the way, it looks like JAVA_HOME_17_...
does not even exist on pgjdbc self-hosted runner (no idea why), so I had to install Java 17 first, then call oracle-action/setup-java to download Java 22, and then re-install Java 17 with actions/setup-java so it restores Java 17 as the default one.
actions/setup-java
always sets the installed Java as the default one: https://github.com/actions/setup-java/issues/560
@vlsi and @sureshg - I went ahead and added support for ARM-based runners. Tests look good so far: https://github.com/oracle-actions/setup-java/actions/runs/7738950766
Can you please double-check using either the commit hash c9a099b12bd9a6c0d491c63b76e99b190a621def
or main
version of this action? Thanks in advance.
@sormuras it's working fine on macos-14
(M1)..thanks for the quick fix.
10s
Run oracle-actions/setup-java@main
Run JAVA=$JAVA_HOME_[1](https://.../actions/runs/77457234162/job/211234587168#step:3:1)7_X64/bin/java
openjdk 17.0.9 2023-10-17
OpenJDK Runtime Environment Temurin-17.0.9+9 (build 17.0.9+9)
OpenJDK 64-Bit Server VM Temurin-17.0.9+9 (build 17.0.9+9, mixed mode)
Archive openjdk-23-ea+7_macos-aarch64_bin.tar.gz in file:///Users/runner/.oracle-actions/setup-java/1b7d4742/
See https://github.com/pgjdbc/pgjdbc/actions/runs/6997219349/job/19033952407#step:5:14
Can the action support arm linux as well? https://github.com/oracle-actions/setup-java/blob/afea155ec9ead9da533a803c03cb135f01e6a949/action.yml#L49
Here's the log (note there's
JAVA_HOME_17_ARM64
environment variable):