Skip to content

dist: Add GraalVM Community distribution support#1042

Open
Copilot wants to merge 11 commits into
mainfrom
copilot/add-graalvm-community-edition
Open

dist: Add GraalVM Community distribution support#1042
Copilot wants to merge 11 commits into
mainfrom
copilot/add-graalvm-community-edition

Conversation

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Description:
Adds first-class support for GraalVM Community Edition so workflows can use setup-java for both Oracle GraalVM and the FOSS Community builds. This introduces a dedicated graalvm-community distribution while preserving existing graalvm behavior.

  • Distribution support

    • Adds graalvm-community to the distribution factory.
    • Resolves stable JDK 17+ GraalVM Community releases from graalvm/graalvm-ce-builds GitHub releases.
    • Rejects EA requests for Community builds instead of routing them through Oracle GraalVM logic.
  • Installer behavior

    • Reuses the existing GraalVM installer flow for download/extract/cache.
    • Uses a dedicated toolcache namespace for Community installs to avoid collisions with Oracle GraalVM.
    • Filters release assets by platform, architecture, and archive type, then selects the highest matching version.
  • Docs and examples

    • Documents graalvm-community in supported distributions and advanced usage.
    • Adds a usage example for Community builds.
- uses: actions/setup-java@v5
  with:
    distribution: 'graalvm-community'
    java-version: '21'

Related issue:
#742

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

Copilot AI changed the title [WIP] Add GraalVM Community Edition support Add GraalVM Community distribution support Jun 22, 2026
Copilot AI requested a review from brunoborges June 22, 2026 20:34
@brunoborges brunoborges added the distribution JDK distribution/version/source support label Jun 22, 2026
@brunoborges

Copy link
Copy Markdown
Contributor

@copilot I believe it is possible to have a cleaner implementation here.

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

@copilot I believe it is possible to have a cleaner implementation here.

Cleaned up the GraalVM Community resolver (05917d5): dropped the asset-name regex in favor of deterministic prefix/suffix matching, replaced the manual pagination while loop with a bounded for loop, and split the logic into small helpers (getAvailableVersions, extractAssetVersion, getNextReleasesUrl). Behavior is unchanged and all 49 GraalVM tests still pass.

@brunoborges

Copy link
Copy Markdown
Contributor

Linking the tracking issue: this PR implements #742 (GraalVM Community Edition distribution support). Maintainers — adding Closes #742 to the PR description will auto-close the issue on merge.

@brunoborges brunoborges marked this pull request as ready for review June 23, 2026 01:33
@brunoborges brunoborges requested a review from a team as a code owner June 23, 2026 01:33
Copilot AI review requested due to automatic review settings June 23, 2026 01:33

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

Adds a first-class graalvm-community distribution to actions/setup-java, enabling installation of FOSS GraalVM Community JDKs from graalvm/graalvm-ce-builds GitHub releases while keeping existing graalvm (Oracle) behavior intact.

Changes:

  • Introduces GraalVMCommunityDistribution that resolves stable JDK 17+ versions by scanning GitHub Releases assets and selecting the highest satisfying version.
  • Adds graalvm-community to the distribution factory mapping.
  • Updates documentation and unit tests to cover the new distribution and toolcache namespace behavior.
Show a summary per file
File Description
src/distributions/graalvm/installer.ts Adds community distribution implementation, GitHub releases resolution, and a distinct toolcache namespace.
src/distributions/distribution-factory.ts Registers graalvm-community and returns the new installer implementation.
README.md Documents graalvm-community in the supported distributions table and notes.
docs/advanced-usage.md Adds an “Advanced usage” section/example for GraalVM Community.
dist/setup/index.js Updates the compiled/bundled action output to include the new distribution.
__tests__/distributors/graalvm-installer.test.ts Adds tests for the community installer behavior and factory mapping.

Copilot's findings

Tip

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

  • Files reviewed: 5/6 changed files
  • Comments generated: 2

Comment on lines +394 to +397
const releases = Array.isArray(response.result) ? response.result : [];
if (releases.length === 0) {
break;
}
Comment thread docs/advanced-usage.md
Comment on lines +187 to +190
- run: |
java -cp java HelloWorldApp
native-image -cp java HelloWorldApp
```
@brunoborges brunoborges changed the title Add GraalVM Community distribution support dist: Add GraalVM Community distribution support Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

distribution JDK distribution/version/source support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants