Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run some tests on JDK 17 #511

Merged
merged 3 commits into from
Dec 8, 2021
Merged

Run some tests on JDK 17 #511

merged 3 commits into from
Dec 8, 2021

Conversation

msridhar
Copy link
Collaborator

@msridhar msridhar commented Dec 7, 2021

This change adds a CI job so we run the same tests on JDK 17 that we currently run on JDK 11. Currently we only test using the latest version of Error Prone; we could also test using 2.4.0 if desired. In either case, the new job(s) should be added as "required" for future changes to land.

@msridhar msridhar changed the title Try testing on JDK 17 (WIP) Run some tests on JDK 17 Dec 7, 2021
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Check out NullAway sources
uses: actions/checkout@v2
- name: 'Set up JDK ${{ matrix.java }}'
uses: actions/setup-java@v1
uses: actions/setup-java@v2
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Took the opportunity to use the latest setup-java action and specify the zulu distribution (same as what Error Prone uses, though it shouldn't matter)

}
}

apply plugin: 'com.vanniktech.maven.publish'

jacoco {
toolVersion = "0.8.2"
toolVersion = "0.8.7"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is needed for JDK 17 compatibility

@msridhar msridhar marked this pull request as ready for review December 7, 2021 23:57
@msridhar msridhar requested a review from lazaroclapp December 7, 2021 23:57
@msridhar msridhar enabled auto-merge (squash) December 7, 2021 23:57
Copy link
Collaborator

@lazaroclapp lazaroclapp left a comment

Choose a reason for hiding this comment

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

Makes sense to me 🚀 !

@@ -66,13 +66,29 @@ test {
maxHeapSize = "1024m"
if (!JavaVersion.current().java9Compatible) {
jvmArgs "-Xbootclasspath/p:${configurations.errorproneJavac.asPath}"
} else {
// to expose necessary JDK types on JDK 16+; see https://errorprone.info/docs/installation#java-9-and-newer
Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes sense. Wonder if we might need to change our own READMEs here once we officially support JDK 17.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, we need to make a pass on our READMEs, particularly for non-Android support; see #467 (which I really need to get back to). For Gradle users, I think these flags all get added automatically by gradle-errorprone-plugin. We need to add them manually here since our unit test runs don't get configured using that plugin

@msridhar msridhar merged commit a20719e into uber:master Dec 8, 2021
@msridhar msridhar deleted the test-on-jdk-17 branch December 8, 2021 01:33
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.

2 participants