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

test against JDK21 (LTS) #391

Merged
merged 1 commit into from
Feb 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: olafurpg/setup-scala@v14
with:
java-version: 8
- run: sbt test scripted
jdk11:
name: JDK11 tests
Expand All @@ -19,7 +21,7 @@ jobs:
- uses: actions/checkout@v4
- uses: olafurpg/setup-scala@v14
with:
java-version: adopt@1.11
java-version: 11
- run: sbt test scripted
jdk17:
name: JDK17 tests
Expand All @@ -30,6 +32,15 @@ jobs:
with:
java-version: 17
- run: sbt "test; scripted sbt-scalafix/*"
jdk21:
name: JDK21 tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: olafurpg/setup-scala@v14
with:
java-version: 21
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 was picking [email protected], which is not JDK21 - following up in #396

- run: sbt "test; scripted sbt-scalafix/*"
windows:
name: Windows tests
runs-on: windows-latest
Expand Down
10 changes: 7 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,14 @@ scalaVersion := "2.12.19"
pluginCrossBuild / sbtVersion := "1.3.1"

scriptedSbt := {
if (System.getProperty("java.specification.version").toDouble < 17)
"1.3.0"
else
val jdk = System.getProperty("java.specification.version").toDouble

if (jdk >= 21)
"1.9.0" // first release that supports JDK21
else if (jdk >= 17)
"1.5.5" // first release that supports JDK17
else
"1.3.0"
}

libraryDependencies += compilerPlugin(scalafixSemanticdb)
Expand Down
Loading