Skip to content

Commit 931922e

Browse files
authored
Merge pull request #15 from mblink/java-25
Build for Java 25
2 parents 5f8a633 + bd46087 commit 931922e

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ jobs:
3030
matrix:
3131
os: [ubuntu-latest]
3232
scala: [2.12.20, 3.7.3]
33-
java: [temurin@11, temurin@17, temurin@21]
33+
java:
34+
- temurin@11
35+
- temurin@17
36+
- temurin@21
37+
- temurin@25
3438
runs-on: ${{ matrix.os }}
3539
steps:
3640
- name: Checkout current branch (full)
@@ -62,6 +66,14 @@ jobs:
6266
java-version: 21
6367
cache: sbt
6468

69+
- name: Setup Java (temurin@25)
70+
if: matrix.java == 'temurin@25'
71+
uses: actions/setup-java@v5
72+
with:
73+
distribution: temurin
74+
java-version: 25
75+
cache: sbt
76+
6577
- name: Setup sbt
6678
uses: sbt/setup-sbt@v1
6779

@@ -77,25 +89,25 @@ jobs:
7789
run: sbt '++ ${{ matrix.scala }}' Test/compile
7890

7991
- name: Build CLI
80-
if: matrix.java == 'temurin@21' && matrix.scala == '3.7.3' && github.event_name == 'push'
92+
if: matrix.java == 'temurin@25' && matrix.scala == '3.7.3' && github.event_name == 'push'
8193
env:
8294
FIND_UNUSED_CLI_ASSEMBLY_JAR_NAME: ${{ format('find-unused-{0}.jar', startsWith(github.ref, 'refs/tags/v') && github.ref_name || github.sha) }}
8395
run: sbt '++ ${{ matrix.scala }}' cli/assembly
8496

8597
- name: Copy CLI
86-
if: matrix.java == 'temurin@21' && matrix.scala == '3.7.3' && github.event_name == 'push'
98+
if: matrix.java == 'temurin@25' && matrix.scala == '3.7.3' && github.event_name == 'push'
8799
run: |
88100
mkdir -p cli/artifacts/
89101
cp cli/target/scala-${{ matrix.scala }}/${{ format('find-unused-{0}.jar', startsWith(github.ref, 'refs/tags/v') && github.ref_name || github.sha) }} cli/artifacts/${{ format('find-unused-{0}.jar', startsWith(github.ref, 'refs/tags/v') && github.ref_name || github.sha) }}
90102
91103
- name: Attest CLI
92-
if: matrix.java == 'temurin@21' && matrix.scala == '3.7.3' && github.event_name == 'push'
104+
if: matrix.java == 'temurin@25' && matrix.scala == '3.7.3' && github.event_name == 'push'
93105
uses: actions/attest-build-provenance@v2
94106
with:
95107
subject-path: cli/artifacts/${{ format('find-unused-{0}.jar', startsWith(github.ref, 'refs/tags/v') && github.ref_name || github.sha) }}
96108

97109
- name: Upload CLI
98-
if: matrix.java == 'temurin@21' && matrix.scala == '3.7.3' && github.event_name == 'push'
110+
if: matrix.java == 'temurin@25' && matrix.scala == '3.7.3' && github.event_name == 'push'
99111
uses: actions/upload-artifact@v4
100112
with:
101113
name: ${{ format('find-unused-{0}.jar', startsWith(github.ref, 'refs/tags/v') && github.ref_name || github.sha) }}
@@ -111,7 +123,7 @@ jobs:
111123
matrix:
112124
os: [ubuntu-latest]
113125
scala: [3.7.3]
114-
java: [temurin@21]
126+
java: [temurin@25]
115127
runs-on: ${{ matrix.os }}
116128
steps:
117129
- name: Checkout current branch (full)

build.sbt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ lazy val scala37 = "3.7.3"
1111

1212
ThisBuild / crossScalaVersions := Seq(scala2, scala37)
1313

14-
val java21 = JavaSpec.temurin("21")
15-
val javaVersions = Seq(JavaSpec.temurin("11"), JavaSpec.temurin("17"), java21)
14+
val java25 = JavaSpec.temurin("25")
15+
val javaVersions = Seq(JavaSpec.temurin("11"), JavaSpec.temurin("17"), JavaSpec.temurin("21"), java25)
1616

1717
val isTag = "startsWith(github.ref, 'refs/tags/v')"
1818

@@ -41,7 +41,7 @@ ThisBuild / githubWorkflowPublishTargetBranches := Seq()
4141
def isJava(v: Int) = s"matrix.java == '${javaVersions.find(_.version == v.toString).get.render}'"
4242
def isScala(v: String) = s"matrix.scala == '$v'"
4343

44-
val shouldBuildCLI = isJava(21) ++ " && " ++ isScala(scala37) ++ " && github.event_name == 'push'"
44+
val shouldBuildCLI = isJava(25) ++ " && " ++ isScala(scala37) ++ " && github.event_name == 'push'"
4545

4646
ThisBuild / githubWorkflowBuild := Seq(
4747
WorkflowStep.Sbt(List("test", "scripted"), name = Some("scripted"), cond = Some(isScala(scala2))),
@@ -83,7 +83,7 @@ ThisBuild / githubWorkflowAddedJobs += WorkflowJob(
8383
id = "release",
8484
name = "Release",
8585
oses = List("ubuntu-latest"),
86-
javas = List(java21),
86+
javas = List(java25),
8787
scalas = List(scala37),
8888
cond = Some(isTag ++ " && github.event_name == 'push'"),
8989
needs = List("build"),

0 commit comments

Comments
 (0)