Description:
When setup-java installs graalvm-community it does not set GRAALVM_HOME. People like me who are migrating from graalvm/setup-graalvm@v1 will have builds that expect this env variable to be set.
I believe the same issue will be present for Oracle GraalVM, but I have not verified.
Task version:
v5.6.0
Platform:
Runner type:
Repro steps:
Tun a build that requires GRAALVM_HOME to be set.
Expected behavior:
The build to succeed, the same as it did when using graalvm/setup-graalvm@v1.
Actual behavior:
The build fails (in my case by an invalid path to the native-image binary because my build is using GRAALVM_HOME to find it.)
Workaround:
Use:
- name: Set up Java (GraalVM)
uses: actions/setup-java@v5
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java-version }}
cache: 'gradle'
# `actions/setup-java` doesn't set `GRAALVM_HOME` so we'll do it explicitly.
- name: Set GRAALVM_HOME
run: echo "GRAALVM_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
Reactions are currently unavailable
Description:
When setup-java installs graalvm-community it does not set GRAALVM_HOME. People like me who are migrating from graalvm/setup-graalvm@v1 will have builds that expect this env variable to be set.
I believe the same issue will be present for Oracle GraalVM, but I have not verified.
Task version:
v5.6.0
Platform:
Runner type:
Repro steps:
Tun a build that requires GRAALVM_HOME to be set.
Expected behavior:
The build to succeed, the same as it did when using graalvm/setup-graalvm@v1.
Actual behavior:
The build fails (in my case by an invalid path to the native-image binary because my build is using GRAALVM_HOME to find it.)
Workaround:
Use:
- name: Set up Java (GraalVM) uses: actions/setup-java@v5 with: distribution: ${{ matrix.distribution }} java-version: ${{ matrix.java-version }} cache: 'gradle' # `actions/setup-java` doesn't set `GRAALVM_HOME` so we'll do it explicitly. - name: Set GRAALVM_HOME run: echo "GRAALVM_HOME=$JAVA_HOME" >> "$GITHUB_ENV"