Skip to content

Commit

Permalink
Upgrade compiler to JDK17, fixes #1367. (#1397)
Browse files Browse the repository at this point in the history
* Upgrade compiler to JDK17, fixes #1367.

Notes:
 * Gradle was upgraded to 6.9.1 to fix issue with needing to manually open jdk.compiler/com.sun.tools.javac.code. See gradle/gradle#15538, https://docs.gradle.org/6.9/release-notes.html, https://docs.gradle.org/6.9.1/release-notes.html
 * Gradle 6.9.1 can't be run from JDK17. As part of the CI setup, we need to make sure a non-JDK17 is set as the default. See https://docs.gradle.org/6.9.1/userguide/compatibility.html
 * zulu seems to provide more consistent release versions. It may be that we "adopt" is no longer terminilogy that should be used. See https://blog.adoptopenjdk.net/2021/03/transition-to-eclipse-an-update/
 * Groovy does not like to compile the test code for open-api-lang-tools with JDK17. Various things were tried. Ended up setting Groovy compiler to 8 for now. May need to bump groovy version?
 * Some additional hinting was needing in the lambdas in TableHandleManagerSerial. I didn't dig in further why.
 * The gradle property org.gradle.java.installations.auto-download=false was removed from gradle.properties. Users wishing to guard against auto-download should set it as appropriate in ~/.gradle/gradle.properties. Note: auto-download is still disabled for CI.

* Upgrade groovy to 3.0.9

Notes:
 * Groovy compiler _can_ be bumped up to Java 17, but the construction in gradle is a bit hacky, so it's not enabled.
 * The only module that needs groovy for compilation is open-api-lang-tools for testing.
 * Spock version in open-api-lang-tools for testing needed to be upgraded.
 * Newer spock needed useJUnitPlatform() for tests to run.
 * Various cleanup of open-api-lang-tools dependencies.
  • Loading branch information
devinrsmith committed Oct 19, 2021
1 parent f97b5cc commit cbb3967
Show file tree
Hide file tree
Showing 25 changed files with 305 additions and 133 deletions.
98 changes: 68 additions & 30 deletions .github/workflows/build-ci.yml
Expand Up @@ -11,14 +11,28 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

# note: this uses Zulu and not AdoptOpenJDK or other. should make sure we build and test on the same one...
- name: Setup JDK
id: setup-java
- name: Setup JDK 8
id: setup-java-8
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '8.0.302'

- name: Setup JDK 17
id: setup-java-17
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '17.0.0'

- name: Set JAVA_HOME
run: echo "JAVA_HOME=${{ steps.setup-java-8.outputs.path }}" >> $GITHUB_ENV

- name: Setup gradle properties
run: |
cat .github/env/${{ runner.os }}/gradle.properties >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java-8.outputs.path }},${{ steps.setup-java-17.outputs.path }}," >> gradle.properties
- name: Get Semver
id: semver
if: ${{ startsWith(github.ref, 'refs/heads/release/v') }}
Expand Down Expand Up @@ -58,11 +72,6 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Setup gradle properties
run: |
cat .github/env/${{ runner.os }}/gradle.properties >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java.outputs.path }}" >> gradle.properties
- name: Create Dockerfile and context
uses: burrunan/gradle-cache-action@v1
with:
Expand All @@ -88,13 +97,28 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Setup JDK
id: setup-java
- name: Setup JDK 8
id: setup-java-8
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '8.0.302'

- name: Setup JDK 17
id: setup-java-17
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '17.0.0'

- name: Set JAVA_HOME
run: echo "JAVA_HOME=${{ steps.setup-java-8.outputs.path }}" >> $GITHUB_ENV

- name: Setup gradle properties
run: |
cat .github/env/${{ runner.os }}/gradle.properties >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java-8.outputs.path }},${{ steps.setup-java-17.outputs.path }}," >> gradle.properties
- name: Get Semver
id: semver
if: ${{ startsWith(github.ref, 'refs/heads/release/v') }}
Expand Down Expand Up @@ -133,11 +157,6 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Setup gradle properties
run: |
cat .github/env/${{ runner.os }}/gradle.properties >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java.outputs.path }}" >> gradle.properties
- name: Create Dockerfile and context
uses: burrunan/gradle-cache-action@v1
with:
Expand All @@ -160,13 +179,28 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Setup JDK
id: setup-java
- name: Setup JDK 8
id: setup-java-8
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '8.0.302'

- name: Setup JDK 17
id: setup-java-17
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '17.0.0'

- name: Set JAVA_HOME
run: echo "JAVA_HOME=${{ steps.setup-java-8.outputs.path }}" >> $GITHUB_ENV

- name: Setup gradle properties
run: |
cat .github/env/${{ runner.os }}/gradle.properties >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java-8.outputs.path }},${{ steps.setup-java-17.outputs.path }}," >> gradle.properties
- name: Get Semver
id: semver
if: ${{ startsWith(github.ref, 'refs/heads/release/v') }}
Expand Down Expand Up @@ -205,11 +239,6 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Setup gradle properties
run: |
cat .github/env/${{ runner.os }}/gradle.properties >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java.outputs.path }}" >> gradle.properties
- name: Create Dockerfile and context
uses: burrunan/gradle-cache-action@v1
with:
Expand Down Expand Up @@ -256,14 +285,28 @@ jobs:
org.opencontainers.image.description=Deephaven web
org.opencontainers.image.licenses=Deephaven Community License Agreement 1.0
# note: this uses Zulu and not AdoptOpenJDK or other. should make sure we build and test on the same one...
- name: Setup JDK
id: setup-java
- name: Setup JDK 8
id: setup-java-8
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '8.0.302'

- name: Setup JDK 17
id: setup-java-17
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '17.0.0'

- name: Set JAVA_HOME
run: echo "JAVA_HOME=${{ steps.setup-java-8.outputs.path }}" >> $GITHUB_ENV

- name: Setup gradle properties
run: |
cat .github/env/${{ runner.os }}/gradle.properties >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java-8.outputs.path }},${{ steps.setup-java-17.outputs.path }}," >> gradle.properties
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1.3.0
Expand All @@ -279,11 +322,6 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Setup gradle properties
run: |
cat .github/env/${{ runner.os }}/gradle.properties >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java.outputs.path }}" >> gradle.properties
- name: Create Dockerfile and context
uses: burrunan/gradle-cache-action@v1
with:
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/check-ci.yml
Expand Up @@ -16,18 +16,27 @@ jobs:
- name: Check gitignore rules
run: .github/scripts/check-gitignore-rules.sh

# note: this uses Zulu and not AdoptOpenJDK or other. should make sure we build and test on the same one...
- name: Setup JDK
id: setup-java
- name: Setup JDK 8
id: setup-java-8
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '8.0.302'

- name: Setup JDK 17
id: setup-java-17
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '17.0.0'

- name: Set JAVA_HOME
run: echo "JAVA_HOME=${{ steps.setup-java-8.outputs.path }}" >> $GITHUB_ENV

- name: Setup gradle properties
run: |
cat .github/env/${{ runner.os }}/gradle.properties >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java.outputs.path }}" >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java-8.outputs.path }},${{ steps.setup-java-17.outputs.path }}," >> gradle.properties
- name: Check
uses: burrunan/gradle-cache-action@v1
Expand Down
39 changes: 31 additions & 8 deletions .github/workflows/docs-ci.yml
Expand Up @@ -13,24 +13,34 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Setup JDK 8
id: setup-java-8
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '8.0.302'

- name: Setup JDK 15
id: setup-java-15
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '15.0.4'

- name: Setup JDK 8
id: setup-java-8
- name: Setup JDK 17
id: setup-java-17
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '8.0.302'
java-version: '17.0.0'

- name: Set JAVA_HOME
run: echo "JAVA_HOME=${{ steps.setup-java-8.outputs.path }}" >> $GITHUB_ENV

- name: Setup gradle properties
run: |
cat .github/env/${{ runner.os }}/gradle.properties >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java-8.outputs.path }},${{ steps.setup-java-15.outputs.path }}" >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java-8.outputs.path }},${{ steps.setup-java-15.outputs.path }},${{ steps.setup-java-17.outputs.path }}" >> gradle.properties
- name: All Javadoc
uses: burrunan/gradle-cache-action@v1
Expand Down Expand Up @@ -64,24 +74,34 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Setup JDK 8
id: setup-java-8
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '8.0.302'

- name: Setup JDK 15
id: setup-java-15
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '15.0.4'

- name: Setup JDK 8
id: setup-java-8
- name: Setup JDK 17
id: setup-java-17
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '8.0.302'
java-version: '17.0.0'

- name: Set JAVA_HOME
run: echo "JAVA_HOME=${{ steps.setup-java-8.outputs.path }}" >> $GITHUB_ENV

- name: Setup gradle properties
run: |
cat .github/env/${{ runner.os }}/gradle.properties >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java-8.outputs.path }},${{ steps.setup-java-15.outputs.path }}" >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java-8.outputs.path }},${{ steps.setup-java-15.outputs.path }},${{ steps.setup-java-17.outputs.path }}" >> gradle.properties
- name: Generate Python Docs
uses: burrunan/gradle-cache-action@v1
Expand Down Expand Up @@ -127,6 +147,9 @@ jobs:
distribution: 'zulu'
java-version: '8.0.302'

- name: Set JAVA_HOME
run: echo "JAVA_HOME=${{ steps.setup-java-8.outputs.path }}" >> $GITHUB_ENV

- name: Setup gradle properties
run: |
cat .github/env/${{ runner.os }}/gradle.properties >> gradle.properties
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/long-check-ci.yml
Expand Up @@ -13,18 +13,27 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

# note: this uses Zulu and not AdoptOpenJDK or other. should make sure we build and test on the same one...
- name: Setup JDK
id: setup-java
- name: Setup JDK 8
id: setup-java-8
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '8.0.302'

- name: Setup JDK 17
id: setup-java-17
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '17.0.0'

- name: Set JAVA_HOME
run: echo "JAVA_HOME=${{ steps.setup-java-8.outputs.path }}" >> $GITHUB_ENV

- name: Setup gradle properties
run: |
cat .github/env/${{ runner.os }}/gradle.properties >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java.outputs.path }}" >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java-8.outputs.path }},${{ steps.setup-java-17.outputs.path }}," >> gradle.properties
- name: Check
uses: burrunan/gradle-cache-action@v1
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/nightly-benchmarks.yml
Expand Up @@ -14,18 +14,27 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

# note: this uses Zulu and not AdoptOpenJDK or other. should make sure we build and test on the same one...
- name: Setup JDK
id: setup-java
- name: Setup JDK 8
id: setup-java-8
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '8.0.302'

- name: Setup JDK 17
id: setup-java-17
uses: actions/setup-java@v2.2.0
with:
distribution: 'zulu'
java-version: '17.0.0'

- name: Set JAVA_HOME
run: echo "JAVA_HOME=${{ steps.setup-java-8.outputs.path }}" >> $GITHUB_ENV

- name: Setup gradle properties
run: |
cat .github/env/${{ runner.os }}/gradle.properties >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java.outputs.path }}" >> gradle.properties
echo "org.gradle.java.installations.paths=${{ steps.setup-java-8.outputs.path }},${{ steps.setup-java-17.outputs.path }}," >> gradle.properties
- name: Build
uses: burrunan/gradle-cache-action@v1
Expand Down

0 comments on commit cbb3967

Please sign in to comment.