Skip to content

Set GRAALVM_HOME for GraalVM distributions - #1146

Merged
brunoborges merged 3 commits into
mainfrom
copilot/fix-setup-java-graalvm-home
Jul 28, 2026
Merged

Set GRAALVM_HOME for GraalVM distributions#1146
brunoborges merged 3 commits into
mainfrom
copilot/fix-setup-java-graalvm-home

Conversation

Copilot AI commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Description:
GraalVM workflows could not locate tools through GRAALVM_HOME, breaking compatibility with graalvm/setup-graalvm.

  • Environment: Export GRAALVM_HOME alongside JAVA_HOME for Oracle GraalVM and GraalVM Community.
  • Coverage: Verify both distributions expose the installed Java path.
  • Bundle: Update the checked-in action distribution.

Related issue:
GraalVM environment compatibility when migrating from graalvm/setup-graalvm.

Check list:

  • Ran npm run check locally (format, lint, build, test) and all checks pass.
  • Documentation changes are not required.
  • Tests were added or updated to cover the changes.

Copilot AI linked an issue Jul 28, 2026 that may be closed by this pull request
5 tasks
Copilot AI changed the title [WIP] Fix setup-java to set GRAALVM_HOME environment variable Set GRAALVM_HOME for GraalVM distributions Jul 28, 2026
Copilot AI requested a review from brunoborges July 28, 2026 02:18
@brunoborges
brunoborges marked this pull request as ready for review July 28, 2026 02:19
@brunoborges
brunoborges requested a review from a team as a code owner July 28, 2026 02:19
Copilot AI review requested due to automatic review settings July 28, 2026 02:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request restores compatibility with workflows that expect GRAALVM_HOME to be set (notably when migrating from graalvm/setup-graalvm) by exporting GRAALVM_HOME whenever a GraalVM distribution is installed via actions/setup-java.

Changes:

  • Export GRAALVM_HOME (set to the same path as JAVA_HOME) for GraalVM distributions by overriding setJavaDefault.
  • Add unit coverage to verify GRAALVM_HOME is exported for both Oracle GraalVM and GraalVM Community.
  • Update the checked-in compiled action bundle (dist/setup/index.js).
Show a summary per file
File Description
src/distributions/graalvm/installer.ts Override setJavaDefault to export GRAALVM_HOME alongside the existing JAVA_HOME behavior.
tests/distributors/graalvm-installer.test.ts Adds tests asserting GRAALVM_HOME is exported for Oracle GraalVM and GraalVM Community installers.
dist/setup/index.js Updates the bundled distribution to include the new GRAALVM_HOME export logic.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/3 changed files
  • Comments generated: 0
  • Review effort level: Low

@brunoborges
brunoborges merged commit e07d36b into main Jul 28, 2026
441 checks passed
@brunoborges
brunoborges deleted the copilot/fix-setup-java-graalvm-home branch July 28, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setup-java does not set GRAALVM_HOME

3 participants