From b84e022d7f7fb98f7f0c1df545d3f17a3a460836 Mon Sep 17 00:00:00 2001 From: Matthew de Detrich <matthew.dedetrich@aiven.io> Date: Tue, 23 Jan 2024 12:45:38 +1100 Subject: [PATCH] Add JDK21 and macos-latest to CI --- .github/workflows/ci.yml | 20 ++++++++++++++++++-- build.sbt | 5 ++++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e44a440..2202b96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,9 +22,9 @@ jobs: name: Build and Test strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-latest, macos-latest] scala: [2.12.18, 2.13.12, 3.3.1] - java: [temurin@8, temurin@11, temurin@17] + java: [temurin@8, temurin@11, temurin@17, temurin@21] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -56,6 +56,14 @@ jobs: java-version: 17 cache: sbt + - name: Setup Java (temurin@21) + if: matrix.java == 'temurin@21' + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + cache: sbt + - name: Check that workflows are up to date run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck @@ -120,6 +128,14 @@ jobs: java-version: 17 cache: sbt + - name: Setup Java (temurin@21) + if: matrix.java == 'temurin@21' + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + cache: sbt + - name: Download target directories (2.12.18) uses: actions/download-artifact@v4 with: diff --git a/build.sbt b/build.sbt index 6badefa..307b9b1 100644 --- a/build.sbt +++ b/build.sbt @@ -200,8 +200,11 @@ ThisBuild / githubWorkflowPublishTargetBranches := RefPredicate.Equals(Ref.Branch("main")) ) +ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "macos-latest") + ThisBuild / githubWorkflowJavaVersions := List( JavaSpec.temurin("8"), JavaSpec.temurin("11"), - JavaSpec.temurin("17") + JavaSpec.temurin("17"), + JavaSpec.temurin("21") )