diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e441cc..aef2969 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,13 +29,8 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - scala: [2.12, 2.13] - java: [temurin@8, temurin@11, temurin@17] - exclude: - - scala: 2.12 - java: temurin@11 - - scala: 2.12 - java: temurin@17 + scala: [2.13] + java: [temurin@11, temurin@17] runs-on: ${{ matrix.os }} timeout-minutes: 60 steps: @@ -44,19 +39,6 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@8) - id: setup-java-temurin-8 - if: matrix.java == 'temurin@8' - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: 8 - cache: sbt - - - name: sbt update - if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' - run: sbt +update - - name: Setup Java (temurin@11) id: setup-java-temurin-11 if: matrix.java == 'temurin@11' @@ -87,26 +69,26 @@ jobs: run: sbt githubWorkflowCheck - name: Check headers and formatting - if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest' run: sbt '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck - name: Test run: sbt '++ ${{ matrix.scala }}' test - name: Check binary compatibility - if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest' run: sbt '++ ${{ matrix.scala }}' mimaReportBinaryIssues - name: Generate API documentation - if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest' run: sbt '++ ${{ matrix.scala }}' doc - name: Check scalafix lints - if: matrix.java == 'temurin@8' && !startsWith(matrix.scala, '3') + if: matrix.java == 'temurin@11' && !startsWith(matrix.scala, '3') run: sbt '++ ${{ matrix.scala }}' 'scalafixAll --check' - name: Check unused compile dependencies - if: matrix.java == 'temurin@8' + if: matrix.java == 'temurin@11' run: sbt '++ ${{ matrix.scala }}' unusedCompileDependenciesTest - name: Make target directories @@ -131,7 +113,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - java: [temurin@8] + java: [temurin@11] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -139,19 +121,6 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@8) - id: setup-java-temurin-8 - if: matrix.java == 'temurin@8' - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: 8 - cache: sbt - - - name: sbt update - if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' - run: sbt +update - - name: Setup Java (temurin@11) id: setup-java-temurin-11 if: matrix.java == 'temurin@11' @@ -178,16 +147,6 @@ jobs: if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' run: sbt +update - - name: Download target directories (2.12) - uses: actions/download-artifact@v3 - with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.12 - - - name: Inflate target directories (2.12) - run: | - tar xf targets.tar - rm targets.tar - - name: Download target directories (2.13) uses: actions/download-artifact@v3 with: @@ -228,7 +187,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - java: [temurin@8] + java: [temurin@11] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -236,19 +195,6 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@8) - id: setup-java-temurin-8 - if: matrix.java == 'temurin@8' - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: 8 - cache: sbt - - - name: sbt update - if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' - run: sbt +update - - name: Setup Java (temurin@11) id: setup-java-temurin-11 if: matrix.java == 'temurin@11' @@ -278,5 +224,5 @@ jobs: - name: Submit Dependencies uses: scalacenter/sbt-dependency-submission@v2 with: - modules-ignore: root_2.12 root_2.13 sbt-http4s-org-scalafix-internal_2.12 sbt-http4s-org-scalafix-internal_2.13 + modules-ignore: root_2.13 sbt-http4s-org-scalafix-internal_2.13 configs-ignore: test scala-tool scala-doc-tool test-internal diff --git a/build.sbt b/build.sbt index 7358555..c111c66 100644 --- a/build.sbt +++ b/build.sbt @@ -5,8 +5,11 @@ ThisBuild / developers := List( tlGitHubDev("henricook", "Henri Cook"), ) +// play-json stopped supporting Java8 in 2.10.1 +ThisBuild / githubWorkflowJavaVersions := List("11", "17").map(JavaSpec.temurin) +ThisBuild / tlJdkRelease := Some(11) + val Scala213 = "2.13.12" -ThisBuild / crossScalaVersions := Seq("2.12.18", Scala213) ThisBuild / scalaVersion := Scala213 lazy val root = project.in(file(".")).aggregate(playJson).enablePlugins(NoPublishPlugin)