Skip to content

Commit

Permalink
Support Java 22
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst committed Aug 20, 2024
1 parent c5cc9d8 commit 7b2378e
Show file tree
Hide file tree
Showing 12 changed files with 182 additions and 171 deletions.
213 changes: 107 additions & 106 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ jobs:

# The dependsOn clauses are:
# * Everything depends on the canary jobs (the main jdk21 jobs), except those jobs themselves.
# * Anything *_jdk11 or *_jdk17 or *_jdk20 depends on *_jdk21.
## TODO: The jdk20 jobs are a bit gratuitous. They are placeholders for jdk22 when it is released.
## Leaving those placeholders will ease the jdk22 edits to this file.
# * Anything *_jdk11 or *_jdk17 or *_jdk22 depends on *_jdk21.
## TODO: Sometimes jdkXX jobs, for a previous non-LTS version (such as jdk20) are a bit gratuitous.
## They are placeholders for the next non-LTS version (such as jdk22) when it is released.
## Leaving those placeholders will ease the edits to this file.

- job: canary_jobs
dependsOn:
Expand All @@ -28,6 +29,7 @@ jobs:
- typecheck_part1_jdk21
- typecheck_part2_jdk21
- misc_jdk21
- misc_jdk22
pool:
vmImage: 'ubuntu-latest'
steps:
Expand Down Expand Up @@ -70,18 +72,18 @@ jobs:
fetchDepth: 25
- bash: ./checker/bin-devel/test-cftests-junit.sh
displayName: test-cftests-junit.sh
# - job: junit_jdk20
# dependsOn:
# - canary_jobs
# pool:
# vmImage: 'ubuntu-latest'
# container: mdernst/cf-ubuntu-jdk20:latest
# timeoutInMinutes: 70
# steps:
# - checkout: self
# fetchDepth: 25
# - bash: ./checker/bin-devel/test-cftests-junit.sh
# displayName: test-cftests-junit.sh
- job: junit_jdk22
dependsOn:
- canary_jobs
pool:
vmImage: 'ubuntu-latest'
container: mdernst/cf-ubuntu-jdk22:latest
timeoutInMinutes: 70
steps:
- checkout: self
fetchDepth: 25
- bash: ./checker/bin-devel/test-cftests-junit.sh
displayName: test-cftests-junit.sh
- job: nonjunit_jdk11
dependsOn:
- canary_jobs
Expand Down Expand Up @@ -115,17 +117,17 @@ jobs:
fetchDepth: 25
- bash: ./checker/bin-devel/test-cftests-nonjunit.sh
displayName: test-cftests-nonjunit.sh
# - job: nonjunit_jdk20
# dependsOn:
# - canary_jobs
# pool:
# vmImage: 'ubuntu-latest'
# container: mdernst/cf-ubuntu-jdk20:latest
# steps:
# - checkout: self
# fetchDepth: 25
# - bash: ./checker/bin-devel/test-cftests-nonjunit.sh
# displayName: test-cftests-nonjunit.sh
- job: nonjunit_jdk22
dependsOn:
- canary_jobs
pool:
vmImage: 'ubuntu-latest'
container: mdernst/cf-ubuntu-jdk22:latest
steps:
- checkout: self
fetchDepth: 25
- bash: ./checker/bin-devel/test-cftests-nonjunit.sh
displayName: test-cftests-nonjunit.sh
# Sometimes one of the invocations of wpi-many in `./gradlew wpiManyTest`
# takes much longer to complete than normal, and this Azure job times out.
# When there is a timeout, one cannot examine wpi or wpi-many logs.
Expand Down Expand Up @@ -179,20 +181,20 @@ jobs:
fetchDepth: 25
- bash: ./checker/bin-devel/test-cftests-inference-part2.sh
displayName: test-cftests-inference-part2.sh
# - job: inference_jdk20
# dependsOn:
# - canary_jobs
# - inference_part1_jdk21
# - inference_part2_jdk21
# pool:
# vmImage: 'ubuntu-latest'
# container: mdernst/cf-ubuntu-jdk20:latest
# timeoutInMinutes: 90
# steps:
# - checkout: self
# fetchDepth: 25
# - bash: ./checker/bin-devel/test-cftests-inference.sh
# displayName: test-cftests-inference.sh
- job: inference_jdk22
dependsOn:
- canary_jobs
- inference_part1_jdk21
- inference_part2_jdk21
pool:
vmImage: 'ubuntu-latest'
container: mdernst/cf-ubuntu-jdk22:latest
timeoutInMinutes: 90
steps:
- checkout: self
fetchDepth: 25
- bash: ./checker/bin-devel/test-cftests-inference.sh
displayName: test-cftests-inference.sh
# Unlimited fetchDepth for misc_jobs, because of need to make contributors.tex
- job: misc_jdk11
dependsOn:
Expand Down Expand Up @@ -224,18 +226,16 @@ jobs:
- checkout: self
- bash: ./checker/bin-devel/test-misc.sh
displayName: test-misc.sh
# - job: misc_jdk20
# dependsOn:
# # - canary_jobs
# - misc_jdk21
# pool:
# vmImage: 'ubuntu-latest'
# container: mdernst/cf-ubuntu-jdk20-plus:latest
# steps:
# - checkout: self
# fetchDepth: 25
# - bash: ./checker/bin-devel/test-misc.sh
# displayName: test-misc.sh
# This is a canary job, so it has no `dependsOn`.
- job: misc_jdk22
pool:
vmImage: 'ubuntu-latest'
container: mdernst/cf-ubuntu-jdk22-plus:latest
steps:
- checkout: self
fetchDepth: 25
- bash: ./checker/bin-devel/test-misc.sh
displayName: test-misc.sh
- job: typecheck_jdk11
dependsOn:
- canary_jobs
Expand Down Expand Up @@ -281,19 +281,19 @@ jobs:
fetchDepth: 1000
- bash: ./checker/bin-devel/test-typecheck-part2.sh
displayName: test-typecheck-part2.sh
# - job: typecheck_jdk20
# dependsOn:
# - canary_jobs
# - typecheck_part1_jdk21
# - typecheck_part2_jdk21
# pool:
# vmImage: 'ubuntu-latest'
# container: mdernst/cf-ubuntu-jdk20-plus:latest
# steps:
# - checkout: self
# fetchDepth: 1000
# - bash: ./checker/bin-devel/test-typecheck.sh
# displayName: test-typecheck.sh
- job: typecheck_jdk22
dependsOn:
- canary_jobs
- typecheck_part1_jdk21
- typecheck_part2_jdk21
pool:
vmImage: 'ubuntu-latest'
container: mdernst/cf-ubuntu-jdk22-plus:latest
steps:
- checkout: self
fetchDepth: 1000
- bash: ./checker/bin-devel/test-typecheck.sh
displayName: test-typecheck.sh
- job: daikon_jdk11
dependsOn:
- canary_jobs
Expand Down Expand Up @@ -346,20 +346,21 @@ jobs:
fetchDepth: 25
- bash: ./checker/bin-devel/test-daikon.sh
displayName: test-daikon-part2.sh
# - job: daikon_jdk20
# dependsOn:
# - canary_jobs
# - daikon_part1_jdk21
# - daikon_part2_jdk21
# pool:
# vmImage: 'ubuntu-latest'
# container: mdernst/cf-ubuntu-jdk20:latest
# timeoutInMinutes: 80
# steps:
# - checkout: self
# fetchDepth: 25
# - bash: ./checker/bin-devel/test-daikon.sh
# displayName: test-daikon.sh
- job: daikon_jdk22
dependsOn:
- canary_jobs
- daikon_part1_jdk21
- daikon_part2_jdk21
pool:
vmImage: 'ubuntu-latest'
container: mdernst/cf-ubuntu-jdk22:latest
timeoutInMinutes: 80
steps:
- checkout: self
fetchDepth: 25
- bash: ./checker/bin-devel/test-daikon.sh
displayName: test-daikon.sh
## I'm not sure why the guava_jdk11 job is failing (it's due to Error Prone).
# - job: guava_jdk11
# dependsOn:
# - canary_jobs
Expand Down Expand Up @@ -403,19 +404,19 @@ jobs:
fetchDepth: 25
- bash: ./checker/bin-devel/test-guava.sh
displayName: test-guava.sh
# - job: guava_jdk20
# dependsOn:
# - canary_jobs
# - guava_jdk21
# pool:
# vmImage: 'ubuntu-latest'
# container: mdernst/cf-ubuntu-jdk20:latest
# timeoutInMinutes: 70
# steps:
# - checkout: self
# fetchDepth: 25
# - bash: ./checker/bin-devel/test-guava.sh
# displayName: test-guava.sh
- job: guava_jdk22
dependsOn:
- canary_jobs
- guava_jdk21
pool:
vmImage: 'ubuntu-latest'
container: mdernst/cf-ubuntu-jdk22:latest
timeoutInMinutes: 70
steps:
- checkout: self
fetchDepth: 25
- bash: ./checker/bin-devel/test-guava.sh
displayName: test-guava.sh
- job: plume_lib_jdk11
dependsOn:
- canary_jobs
Expand Down Expand Up @@ -451,18 +452,18 @@ jobs:
fetchDepth: 25
- bash: ./checker/bin-devel/test-plume-lib.sh
displayName: test-plume-lib.sh
# - job: plume_lib_jdk20
# dependsOn:
# - canary_jobs
# - plume_lib_jdk21
# pool:
# vmImage: 'ubuntu-latest'
# container: mdernst/cf-ubuntu-jdk20:latest
# steps:
# - checkout: self
# fetchDepth: 25
# - bash: ./checker/bin-devel/test-plume-lib.sh
# displayName: test-plume-lib.sh
- job: plume_lib_jdk22
dependsOn:
- canary_jobs
- plume_lib_jdk21
pool:
vmImage: 'ubuntu-latest'
container: mdernst/cf-ubuntu-jdk22:latest
steps:
- checkout: self
fetchDepth: 25
- bash: ./checker/bin-devel/test-plume-lib.sh
displayName: test-plume-lib.sh
## The downstream jobs are not currently needed because test-downstream.sh is empty.
# - job: downstream_jdk11
# dependsOn:
Expand Down Expand Up @@ -499,13 +500,13 @@ jobs:
# fetchDepth: 25
# - bash: ./checker/bin-devel/test-downstream.sh
# displayName: test-downstream.sh
# - job: downstream_jdk20
# - job: downstream_jdk22
# dependsOn:
# - canary_jobs
# - downstream_jdk21
# pool:
# vmImage: 'ubuntu-latest'
# container: mdernst/cf-ubuntu-jdk20:latest
# container: mdernst/cf-ubuntu-jdk22:latest
# steps:
# - checkout: self
# fetchDepth: 25
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ext {
isJava17orHigher = JavaVersion.current() >= JavaVersion.VERSION_17
isJava21orHigher = JavaVersion.current() >= JavaVersion.VERSION_21

// As of 2023-09-23, delombok doesn't yet support JDK 22; see https://projectlombok.org/changelog .
// As of 2024-08-19 (Lombok 1.18.34), delombok doesn't yet support JDK 23; see https://projectlombok.org/changelog .
skipDelombok = JavaVersion.current() > JavaVersion.VERSION_21

parentDir = file("${rootDir}/../").absolutePath
Expand Down
8 changes: 4 additions & 4 deletions checker/bin-devel/Dockerfile-README
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,22 @@ export DPROJECT=cf
create_upload_docker_image

export OS=ubuntu
export JDKVER=jdk20
export JDKVER=jdk21
export DPROJECT=cf
create_upload_docker_image

export OS=ubuntu
export JDKVER=jdk20-plus
export JDKVER=jdk21-plus
export DPROJECT=cf
create_upload_docker_image

export OS=ubuntu
export JDKVER=jdk21
export JDKVER=jdk22
export DPROJECT=cf
create_upload_docker_image

export OS=ubuntu
export JDKVER=jdk21-plus
export JDKVER=jdk22-plus
export DPROJECT=cf
create_upload_docker_image

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# Create a Docker image that is ready to run the main Checker Framework tests,
# using JDK 20.
# using JDK 22.
# (This is OpenJDK, not Oracle JDK. There are different instructions for
# installing a LTS release of Java.)
# To convert this file to use a newer JDK, search (from the top level of the
# Checker Framework and Annotation Tools repositories) for: (java|jdk).?20\b
# Checker Framework and Annotation Tools repositories) for: (java|jdk).?22\b

# "ubuntu" is the latest LTS release. "ubuntu:rolling" is the latest release.
# Ubuntu 23.10 contains the package "openjdk-20-jdk".
FROM ubuntu:23.10
# See releases at https://hub.docker.com/_/ubuntu for available images.
# See https://packages.ubuntu.com/search?suite=default&section=all&arch=any&keywords=openjdk-22-jdk&searchon=names
# to see what Ubuntu versions support a particular OpenJDK version.
FROM ubuntu:mantic
MAINTAINER Michael Ernst <mernst@cs.washington.edu>

# According to
Expand All @@ -29,7 +31,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \
ca-certificates-java \
&& aptitude -y install \
openjdk-17-jdk \
openjdk-20-jdk
openjdk-22-jdk

# Known good combinations of JTReg and the JDK appear at https://builds.shipilev.net/jtreg/ .

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# Create a Docker image that is ready to run the full Checker Framework tests,
# including building the manual and Javadoc, using JDK 20.
# including building the manual and Javadoc, using JDK 22.
# (This is OpenJDK, not Oracle JDK. There are different instructions for
# installing a LTS release of Java.)
# To convert this file to use a newer JDK, search (from the top level of the
# Checker Framework and Annotation Tools repositories) for: (java|jdk).?20\b
# Checker Framework and Annotation Tools repositories) for: (java|jdk).?22\b

# "ubuntu" is the latest LTS release. "ubuntu:rolling" is the latest release.
# Ubuntu 23.10 contains the package "openjdk-20-jdk".
FROM ubuntu:23.10
# See releases at https://hub.docker.com/_/ubuntu for available images.
# See https://packages.ubuntu.com/search?suite=default&section=all&arch=any&keywords=openjdk-22-jdk&searchon=names
# to see what Ubuntu versions support a particular OpenJDK version.
FROM ubuntu:mantic
MAINTAINER Michael Ernst <mernst@cs.washington.edu>

# According to
Expand All @@ -29,7 +31,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \
ca-certificates-java \
&& aptitude -y install \
openjdk-17-jdk \
openjdk-20-jdk
openjdk-22-jdk

# Known good combinations of JTReg and the JDK appear at https://builds.shipilev.net/jtreg/ .

Expand Down
5 changes: 4 additions & 1 deletion checker/bin-devel/clone-related.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ echo "... done: (cd ${AT} && ./.build-without-test.sh)"

# Download dependencies, trying a second time if there is a failure.
(TERM=dumb timeout 300 ./gradlew resolveDependencies || \
(sleep 1m && ./gradlew resolveDependencies))
(echo "./gradlew resolveDependencies failed; sleeping before trying again." && \
sleep 1m && \
echo "Trying again: ./gradlew resolveDependencies" && \
TERM=dumb timeout 300 ./gradlew resolveDependencies))

echo Exiting checker/bin-devel/clone-related.sh in "$(pwd)"
Loading

0 comments on commit 7b2378e

Please sign in to comment.