Skip to content

CI: Test on JDK 26 stable and JDK 27 EA#1612

Merged
wmdietl merged 7 commits intomasterfrom
jdk26-jdk27
Apr 1, 2026
Merged

CI: Test on JDK 26 stable and JDK 27 EA#1612
wmdietl merged 7 commits intomasterfrom
jdk26-jdk27

Conversation

@wmdietl
Copy link
Copy Markdown
Member

@wmdietl wmdietl commented Mar 26, 2026

Fixes #1565.

Copilot AI review requested due to automatic review settings March 26, 2026 20:58
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the CI workflow’s JDK provisioning to move off Temurin, enable Gradle caching in Java setup steps, and adjust early-access (EA) testing toward newer JDKs.

Changes:

  • Switch actions/setup-java distribution from Temurin to Zulu across jobs.
  • Add cache: 'gradle' to actions/setup-java steps.
  • Change EA configuration toward JDK 27 and add an Oracle EA setup step (intended for EA runs).
Comments suppressed due to low confidence (5)

.github/workflows/ci.yml:101

  • This job now enables cache: 'gradle' in actions/setup-java and also runs gradle/actions/setup-gradle (which configures Gradle caching). Consider using only one caching mechanism to avoid redundant cache save/restore work and potential cache churn.
    - name: Set up JDK ${{ matrix.java_version }}
      uses: actions/setup-java@v5
      with:
        java-version: ${{ matrix.java_version }}
        distribution: 'zulu'
        cache: 'gradle'

    # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
    # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
    - name: Setup Gradle
      uses: gradle/actions/setup-gradle@v6.0.1
      # Setup for misc tests

.github/workflows/ci.yml:228

  • In otherjdks, actions/setup-java is configured with cache: 'gradle' while the job also runs gradle/actions/setup-gradle later. Using both caching mechanisms is redundant; consider keeping caching in one place to reduce CI overhead.
    - name: Set up JDK 21 for Gradle to run on
      uses: actions/setup-java@v5
      with:
        # Install JDK 21 first, to make it available to Gradle using `gradle.properties` below.
        java-version: 21
        distribution: 'zulu'
        cache: 'gradle'
    - name: Set up JDK ${{ matrix.java.version }}
      if: ${{ matrix.java.version != 'EA' }}
      uses: actions/setup-java@v5
      with:
        # Install the requested JDK second, to make it the default on which everything else runs.
        java-version: ${{ matrix.java.version }}
        distribution: 'zulu'
        cache: 'gradle'
    - name: Set up JDK $JDK_EA_MAJOR
      if: ${{ matrix.java.version == 'EA' }}
      uses: oracle-actions/setup-java@v1
      with:
        # Install the requested EA JDK second, to make it the default on which everything else runs.
        website: jdk.java.net
        release: ${{ matrix.java.version }}
        cache: 'gradle'
    - name: Inject JAVA_HOME_21_64 into `gradle.properties` to always use JDK 21 for Gradle
      run: mkdir ~/.gradle && echo "org.gradle.java.home=$JAVA_HOME_21_X64" >> ~/.gradle/gradle.properties

    # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
    # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
    - name: Setup Gradle
      uses: gradle/actions/setup-gradle@v6.0.1
    - name: Install misc dependencies

.github/workflows/ci.yml:287

  • This job enables cache: 'gradle' in actions/setup-java and also uses gradle/actions/setup-gradle for Gradle configuration/caching. Consider removing one of these caches to avoid duplicated cache operations.
    - name: Set up JDK ${{ matrix.java_version }}
      uses: actions/setup-java@v5
      with:
        java-version: ${{ matrix.java_version }}
        distribution: 'zulu'
        cache: 'gradle'

    # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
    # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
    - name: Setup Gradle
      uses: gradle/actions/setup-gradle@v6.0.1

.github/workflows/ci.yml:143

  • The PR title indicates testing on JDK 26 stable and JDK 27 EA, but the otherjdks matrix still lists {version: '25', ...} and {version: 'ea', ...}. Unless those are updated, CI will continue running the newest non‑LTS on 25 rather than 26, which doesn’t match the intended coverage.
      JDK_EA_MAJOR: "27"
    strategy:
      fail-fast: true
      matrix:
        # `jspecify-conformance` and `jspecify-reference-checker` only tested on JDK 21.
        script: ['cftests-junit', 'cftests-nonjunit', 'cftests-junit-jdk21',
          'typecheck-part1', 'typecheck-part2',
          'guava', 'plume-lib',
          'daikon-part1', 'daikon-part2',
          'misc']
        # JDK 21 used by `sanity` and `remainder` before.
        # Keep all LTS versions and the newest non-LTS version.
        # `experimental` versions use the $version compiler, but run on JDK 21.
        java: [{version: '8', experimental: false},
          {version: '11', experimental: false},
          {version: '17', experimental: false},
          {version: '25', experimental: false},
          {version: 'ea', experimental: true}]

.github/workflows/ci.yml:42

  • actions/setup-java is now configured with cache: 'gradle' while the workflow also runs gradle/actions/setup-gradle, which already sets up Gradle caching (per the comment immediately below). Using both caches is redundant and can increase cache restore/save time or cause cache churn; consider relying on the Gradle action’s caching and removing the setup-java Gradle cache, or vice versa, but not both.
    - name: Set up JDK ${{ matrix.java_version }}
      uses: actions/setup-java@v5
      with:
        java-version: ${{ matrix.java_version }}
        distribution: 'zulu'
        cache: 'gradle'

    # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
    # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
    - name: Setup Gradle
      uses: gradle/actions/setup-gradle@v6.0.1

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

java-version: ${{ matrix.java.version }}
distribution: 'zulu'
cache: 'gradle'
- name: Set up JDK $JDK_EA_MAJOR
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

Step name Set up JDK $JDK_EA_MAJOR won’t interpolate $JDK_EA_MAJOR in GitHub Actions YAML; it will be shown literally. Use the Actions expression syntax (e.g., ${{ env.JDK_EA_MAJOR }}) if you want the major version to appear in the step name.

Suggested change
- name: Set up JDK $JDK_EA_MAJOR
- name: Set up JDK ${{ env.JDK_EA_MAJOR }}

Copilot uses AI. Check for mistakes.
@wmdietl
Copy link
Copy Markdown
Member Author

wmdietl commented Mar 30, 2026

@thisisalexandercook Could you take a look whether we can specify a specific EA build to use? Otherwise we might again run into random failures when an EA build breaks us.

@wmdietl
Copy link
Copy Markdown
Member Author

wmdietl commented Apr 1, 2026

@thisisalexandercook Oracle Actions are documented here: https://github.com/oracle-actions/setup-java
They link to this file: https://github.com/oracle-actions/setup-java/blob/main/jdk.java.net-uri.properties
So I think we should switch the release from EA to 27 and add a version attribute that points to 27-ea+15.
And then we again use a regex renovate recipe to update to the newest build in a separate PR, allowing us to always be on the latest build that works.

Should I merge this PR now and you follow up with those improvements? Or do you want to start a new PR that builds on this one and already fixes these issues?

@thisisalexandercook
Copy link
Copy Markdown
Collaborator

thisisalexandercook commented Apr 1, 2026

@thisisalexandercook Oracle Actions are documented here: https://github.com/oracle-actions/setup-java They link to this file: https://github.com/oracle-actions/setup-java/blob/main/jdk.java.net-uri.properties So I think we should switch the release from EA to 27 and add a version attribute that points to 27-ea+15. And then we again use a regex renovate recipe to update to the newest build in a separate PR, allowing us to always be on the latest build that works.

Should I merge this PR now and you follow up with those improvements? Or do you want to start a new PR that builds on this one and already fixes these issues?

@wmdietl I've opened a follow-up PR that makes these changes directly against this branch: #1616

@wmdietl wmdietl enabled auto-merge (squash) April 1, 2026 19:35
@wmdietl wmdietl merged commit 3dbff2d into master Apr 1, 2026
50 checks passed
@wmdietl wmdietl deleted the jdk26-jdk27 branch April 1, 2026 20:42
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.

Test with newest JDK 27 EA builds

3 participants