From dd13392876d6fa86bbbf332c19e195b217d8655f Mon Sep 17 00:00:00 2001 From: "Ross A. Baker" Date: Wed, 19 Jun 2024 19:19:38 -0400 Subject: [PATCH] Update Java versions --- .github/workflows/ci.yml | 15 +++++++++------ build.sbt | 7 ++++++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e885eee..caabc08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,10 @@ jobs: matrix: os: [ubuntu-latest, macos-latest] scala: [2.12] - java: [temurin@8, temurin@17] + java: [temurin@8, temurin@21] + exclude: + - os: macos-latest + java: temurin@8 runs-on: ${{ matrix.os }} timeout-minutes: 60 steps: @@ -55,17 +58,17 @@ jobs: if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' run: sbt +update - - name: Setup Java (temurin@17) - id: setup-java-temurin-17 - if: matrix.java == 'temurin@17' + - name: Setup Java (temurin@21) + id: setup-java-temurin-21 + if: matrix.java == 'temurin@21' uses: actions/setup-java@v4 with: distribution: temurin - java-version: 17 + java-version: 21 cache: sbt - name: sbt update - if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@21' && steps.setup-java-temurin-21.outputs.cache-hit == 'false' run: sbt +update - name: Check that workflows are up to date diff --git a/build.sbt b/build.sbt index 9259015..5063bd8 100644 --- a/build.sbt +++ b/build.sbt @@ -17,9 +17,14 @@ val MacOS = "macos-latest" ThisBuild / githubWorkflowOSes := Seq(PrimaryOS, MacOS) val PrimaryJava = JavaSpec.temurin("8") -val LTSJava = JavaSpec.temurin("17") +val LTSJava = JavaSpec.temurin("21") ThisBuild / githubWorkflowJavaVersions := Seq(PrimaryJava, LTSJava) +// MacOS runners do not have temurin@8 +ThisBuild / githubWorkflowBuildMatrixExclusions := Seq( + MatrixExclude(Map("os" -> MacOS, "java" -> JavaSpec.temurin("8").render)) +) + // This build is for this Giter8 template. // To test the template run `g8` or `g8Test` from the sbt session. // See http://www.foundweekends.org/giter8/testing.html#Using+the+Giter8Plugin for more details.