From cdd248674358ee005d9bbcd9579658da037c3045 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Tue, 7 Nov 2023 16:08:15 +0000 Subject: [PATCH 1/5] Update mdoc, sbt-mdoc to 2.5.0 --- site/build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/build.sbt b/site/build.sbt index 6b255687..36e79b2e 100644 --- a/site/build.sbt +++ b/site/build.sbt @@ -1,2 +1,2 @@ -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.4.0") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.0") addSbtPlugin("org.typelevel" % "laika-sbt" % "1.0.0") From c0ac2309cfab62469b95b0393914daf905dfd39f Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 8 Nov 2023 00:41:52 +0000 Subject: [PATCH 2/5] Use Temurin 17 as default JDK --- .github/workflows/ci.yml | 102 +++++++++++++++++++-------------------- .mergify.yml | 10 ++-- build.sbt | 5 +- 3 files changed, 59 insertions(+), 58 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72624341..019b3e82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,9 +44,9 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] scala: [2.12] java: - - temurin@8 - - temurin@11 - temurin@17 + - temurin@11 + - temurin@8 - graal_22.3.2@11 - graalvm@17 - corretto@17 @@ -57,9 +57,9 @@ jobs: os: macos-latest - java: temurin@11 os: windows-latest - - java: temurin@17 + - java: temurin@8 os: macos-latest - - java: temurin@17 + - java: temurin@8 os: windows-latest - java: graal_22.3.2@11 os: macos-latest @@ -90,17 +90,17 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@8) - id: setup-java-temurin-8 - if: matrix.java == 'temurin@8' + - name: Setup Java (temurin@17) + id: setup-java-temurin-17 + if: matrix.java == 'temurin@17' uses: actions/setup-java@v3 with: distribution: temurin - java-version: 8 + java-version: 17 cache: sbt - name: sbt update - if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' shell: bash run: sbt +update @@ -118,17 +118,17 @@ jobs: shell: bash run: sbt +update - - name: Setup Java (temurin@17) - id: setup-java-temurin-17 - if: matrix.java == 'temurin@17' + - 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: 17 + java-version: 8 cache: sbt - name: sbt update - if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' shell: bash run: sbt +update @@ -193,12 +193,12 @@ jobs: run: sbt githubWorkflowCheck - name: Check headers and formatting - if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest' shell: bash run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck - name: Check scalafix lints - if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest' shell: bash run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' 'scalafixAll --check' @@ -207,12 +207,12 @@ jobs: run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test - name: Check binary compatibility - if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest' shell: bash run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues - name: Generate API documentation - if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest' shell: bash run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc @@ -240,7 +240,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - java: [temurin@8] + java: [temurin@17] runs-on: ${{ matrix.os }} timeout-minutes: 45 steps: @@ -253,17 +253,17 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@8) - id: setup-java-temurin-8 - if: matrix.java == 'temurin@8' + - name: Setup Java (temurin@17) + id: setup-java-temurin-17 + if: matrix.java == 'temurin@17' uses: actions/setup-java@v3 with: distribution: temurin - java-version: 8 + java-version: 17 cache: sbt - name: sbt update - if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' run: sbt +update - name: Setup Java (temurin@11) @@ -279,17 +279,17 @@ jobs: if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.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@8) + id: setup-java-temurin-8 + if: matrix.java == 'temurin@8' uses: actions/setup-java@v3 with: distribution: temurin - java-version: 17 + java-version: 8 cache: sbt - name: sbt update - if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' run: sbt +update - name: Setup GraalVM (graal_22.3.2@11) @@ -384,7 +384,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - java: [temurin@8] + java: [temurin@17] runs-on: ${{ matrix.os }} steps: - name: Ignore line ending differences in git @@ -396,17 +396,17 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@8) - id: setup-java-temurin-8 - if: matrix.java == 'temurin@8' + - name: Setup Java (temurin@17) + id: setup-java-temurin-17 + if: matrix.java == 'temurin@17' uses: actions/setup-java@v3 with: distribution: temurin - java-version: 8 + java-version: 17 cache: sbt - name: sbt update - if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' run: sbt +update - name: Setup Java (temurin@11) @@ -422,17 +422,17 @@ jobs: if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.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@8) + id: setup-java-temurin-8 + if: matrix.java == 'temurin@8' uses: actions/setup-java@v3 with: distribution: temurin - java-version: 17 + java-version: 8 cache: sbt - name: sbt update - if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' run: sbt +update - name: Setup GraalVM (graal_22.3.2@11) @@ -523,7 +523,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - java: [temurin@8] + java: [temurin@17] runs-on: ${{ matrix.os }} steps: - name: Ignore line ending differences in git @@ -535,17 +535,17 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@8) - id: setup-java-temurin-8 - if: matrix.java == 'temurin@8' + - name: Setup Java (temurin@17) + id: setup-java-temurin-17 + if: matrix.java == 'temurin@17' uses: actions/setup-java@v3 with: distribution: temurin - java-version: 8 + java-version: 17 cache: sbt - name: sbt update - if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' run: sbt +update - name: Setup Java (temurin@11) @@ -561,17 +561,17 @@ jobs: if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.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@8) + id: setup-java-temurin-8 + if: matrix.java == 'temurin@8' uses: actions/setup-java@v3 with: distribution: temurin - java-version: 17 + java-version: 8 cache: sbt - name: sbt update - if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' run: sbt +update - name: Setup GraalVM (graal_22.3.2@11) diff --git a/.mergify.yml b/.mergify.yml index 258627d1..bfa91fb4 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -12,17 +12,17 @@ pull_request_rules: - or: - body~=labels:.*early-semver-patch - body~=labels:.*early-semver-minor - - status-success=Build and Test (ubuntu-latest, 2.12, temurin@8, sbt-typelevelJVM) - - status-success=Build and Test (ubuntu-latest, 2.12, temurin@11, sbt-typelevelJVM) - status-success=Build and Test (ubuntu-latest, 2.12, temurin@17, sbt-typelevelJVM) + - status-success=Build and Test (ubuntu-latest, 2.12, temurin@11, sbt-typelevelJVM) + - status-success=Build and Test (ubuntu-latest, 2.12, temurin@8, sbt-typelevelJVM) - status-success=Build and Test (ubuntu-latest, 2.12, graal_22.3.2@11, sbt-typelevelJVM) - status-success=Build and Test (ubuntu-latest, 2.12, graalvm@17, sbt-typelevelJVM) - status-success=Build and Test (ubuntu-latest, 2.12, corretto@17, sbt-typelevelJVM) - status-success=Build and Test (ubuntu-latest, 2.12, semeru@17, sbt-typelevelJVM) - - status-success=Build and Test (macos-latest, 2.12, temurin@8, sbt-typelevelJVM) - - status-success=Build and Test (windows-latest, 2.12, temurin@8, sbt-typelevelJVM) + - status-success=Build and Test (macos-latest, 2.12, temurin@17, sbt-typelevelJVM) + - status-success=Build and Test (windows-latest, 2.12, temurin@17, sbt-typelevelJVM) - status-success=Validate Steward Config (ubuntu-latest, temurin@11) - - status-success=Generate Site (ubuntu-latest, temurin@8) + - status-success=Generate Site (ubuntu-latest, temurin@17) - '#approved-reviews-by>=1' actions: merge: {} diff --git a/build.sbt b/build.sbt index 3720952a..df18fe89 100644 --- a/build.sbt +++ b/build.sbt @@ -12,9 +12,10 @@ ThisBuild / developers ++= List( ) ThisBuild / startYear := Some(2022) -ThisBuild / githubWorkflowJavaVersions ++= Seq( - JavaSpec.temurin("11"), +ThisBuild / githubWorkflowJavaVersions := Seq( JavaSpec.temurin("17"), + JavaSpec.temurin("11"), + JavaSpec.temurin("8"), JavaSpec(JavaSpec.Distribution.GraalVM("22.3.2"), "11"), JavaSpec.graalvm("17"), JavaSpec.corretto("17"), From 02aeed8142caed3dffc2449d757c2b2e7d9485c6 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 8 Nov 2023 01:48:02 +0000 Subject: [PATCH 3/5] Revert "Use Temurin 17 as default JDK" This reverts commit c0ac2309cfab62469b95b0393914daf905dfd39f. --- .github/workflows/ci.yml | 102 +++++++++++++++++++-------------------- .mergify.yml | 10 ++-- build.sbt | 5 +- 3 files changed, 58 insertions(+), 59 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 019b3e82..72624341 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,9 +44,9 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] scala: [2.12] java: - - temurin@17 - - temurin@11 - temurin@8 + - temurin@11 + - temurin@17 - graal_22.3.2@11 - graalvm@17 - corretto@17 @@ -57,9 +57,9 @@ jobs: os: macos-latest - java: temurin@11 os: windows-latest - - java: temurin@8 + - java: temurin@17 os: macos-latest - - java: temurin@8 + - java: temurin@17 os: windows-latest - java: graal_22.3.2@11 os: macos-latest @@ -90,17 +90,17 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@17) - id: setup-java-temurin-17 - if: matrix.java == 'temurin@17' + - 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: 17 + java-version: 8 cache: sbt - name: sbt update - if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' shell: bash run: sbt +update @@ -118,17 +118,17 @@ jobs: shell: bash run: sbt +update - - name: Setup Java (temurin@8) - id: setup-java-temurin-8 - if: matrix.java == 'temurin@8' + - name: Setup Java (temurin@17) + id: setup-java-temurin-17 + if: matrix.java == 'temurin@17' uses: actions/setup-java@v3 with: distribution: temurin - java-version: 8 + java-version: 17 cache: sbt - name: sbt update - if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' shell: bash run: sbt +update @@ -193,12 +193,12 @@ jobs: run: sbt githubWorkflowCheck - name: Check headers and formatting - if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest' shell: bash run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck - name: Check scalafix lints - if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest' shell: bash run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' 'scalafixAll --check' @@ -207,12 +207,12 @@ jobs: run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test - name: Check binary compatibility - if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest' shell: bash run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues - name: Generate API documentation - if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest' + if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest' shell: bash run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc @@ -240,7 +240,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - java: [temurin@17] + java: [temurin@8] runs-on: ${{ matrix.os }} timeout-minutes: 45 steps: @@ -253,17 +253,17 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@17) - id: setup-java-temurin-17 - if: matrix.java == 'temurin@17' + - 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: 17 + java-version: 8 cache: sbt - name: sbt update - if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' run: sbt +update - name: Setup Java (temurin@11) @@ -279,17 +279,17 @@ jobs: if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false' run: sbt +update - - name: Setup Java (temurin@8) - id: setup-java-temurin-8 - if: matrix.java == 'temurin@8' + - name: Setup Java (temurin@17) + id: setup-java-temurin-17 + if: matrix.java == 'temurin@17' uses: actions/setup-java@v3 with: distribution: temurin - java-version: 8 + java-version: 17 cache: sbt - name: sbt update - if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' run: sbt +update - name: Setup GraalVM (graal_22.3.2@11) @@ -384,7 +384,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - java: [temurin@17] + java: [temurin@8] runs-on: ${{ matrix.os }} steps: - name: Ignore line ending differences in git @@ -396,17 +396,17 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@17) - id: setup-java-temurin-17 - if: matrix.java == 'temurin@17' + - 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: 17 + java-version: 8 cache: sbt - name: sbt update - if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' run: sbt +update - name: Setup Java (temurin@11) @@ -422,17 +422,17 @@ jobs: if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false' run: sbt +update - - name: Setup Java (temurin@8) - id: setup-java-temurin-8 - if: matrix.java == 'temurin@8' + - name: Setup Java (temurin@17) + id: setup-java-temurin-17 + if: matrix.java == 'temurin@17' uses: actions/setup-java@v3 with: distribution: temurin - java-version: 8 + java-version: 17 cache: sbt - name: sbt update - if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' run: sbt +update - name: Setup GraalVM (graal_22.3.2@11) @@ -523,7 +523,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - java: [temurin@17] + java: [temurin@8] runs-on: ${{ matrix.os }} steps: - name: Ignore line ending differences in git @@ -535,17 +535,17 @@ jobs: with: fetch-depth: 0 - - name: Setup Java (temurin@17) - id: setup-java-temurin-17 - if: matrix.java == 'temurin@17' + - 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: 17 + java-version: 8 cache: sbt - name: sbt update - if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' run: sbt +update - name: Setup Java (temurin@11) @@ -561,17 +561,17 @@ jobs: if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false' run: sbt +update - - name: Setup Java (temurin@8) - id: setup-java-temurin-8 - if: matrix.java == 'temurin@8' + - name: Setup Java (temurin@17) + id: setup-java-temurin-17 + if: matrix.java == 'temurin@17' uses: actions/setup-java@v3 with: distribution: temurin - java-version: 8 + java-version: 17 cache: sbt - name: sbt update - if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false' + if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false' run: sbt +update - name: Setup GraalVM (graal_22.3.2@11) diff --git a/.mergify.yml b/.mergify.yml index bfa91fb4..258627d1 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -12,17 +12,17 @@ pull_request_rules: - or: - body~=labels:.*early-semver-patch - body~=labels:.*early-semver-minor - - status-success=Build and Test (ubuntu-latest, 2.12, temurin@17, sbt-typelevelJVM) - - status-success=Build and Test (ubuntu-latest, 2.12, temurin@11, sbt-typelevelJVM) - status-success=Build and Test (ubuntu-latest, 2.12, temurin@8, sbt-typelevelJVM) + - status-success=Build and Test (ubuntu-latest, 2.12, temurin@11, sbt-typelevelJVM) + - status-success=Build and Test (ubuntu-latest, 2.12, temurin@17, sbt-typelevelJVM) - status-success=Build and Test (ubuntu-latest, 2.12, graal_22.3.2@11, sbt-typelevelJVM) - status-success=Build and Test (ubuntu-latest, 2.12, graalvm@17, sbt-typelevelJVM) - status-success=Build and Test (ubuntu-latest, 2.12, corretto@17, sbt-typelevelJVM) - status-success=Build and Test (ubuntu-latest, 2.12, semeru@17, sbt-typelevelJVM) - - status-success=Build and Test (macos-latest, 2.12, temurin@17, sbt-typelevelJVM) - - status-success=Build and Test (windows-latest, 2.12, temurin@17, sbt-typelevelJVM) + - status-success=Build and Test (macos-latest, 2.12, temurin@8, sbt-typelevelJVM) + - status-success=Build and Test (windows-latest, 2.12, temurin@8, sbt-typelevelJVM) - status-success=Validate Steward Config (ubuntu-latest, temurin@11) - - status-success=Generate Site (ubuntu-latest, temurin@17) + - status-success=Generate Site (ubuntu-latest, temurin@8) - '#approved-reviews-by>=1' actions: merge: {} diff --git a/build.sbt b/build.sbt index df18fe89..3720952a 100644 --- a/build.sbt +++ b/build.sbt @@ -12,10 +12,9 @@ ThisBuild / developers ++= List( ) ThisBuild / startYear := Some(2022) -ThisBuild / githubWorkflowJavaVersions := Seq( - JavaSpec.temurin("17"), +ThisBuild / githubWorkflowJavaVersions ++= Seq( JavaSpec.temurin("11"), - JavaSpec.temurin("8"), + JavaSpec.temurin("17"), JavaSpec(JavaSpec.Distribution.GraalVM("22.3.2"), "11"), JavaSpec.graalvm("17"), JavaSpec.corretto("17"), From 2ef6dd0d22f140d4add784bbb98f3db5e6330141 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 8 Nov 2023 02:08:36 +0000 Subject: [PATCH 4/5] Expose `tlSiteJavaVersion`, auto-config to JDK 11+ --- .github/workflows/ci.yml | 2 +- .mergify.yml | 2 +- docs/customization.md | 1 + .../typelevel/sbt/TypelevelSitePlugin.scala | 34 ++++++++++++++++--- 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72624341..ce18b164 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -523,7 +523,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - java: [temurin@8] + java: [temurin@11] runs-on: ${{ matrix.os }} steps: - name: Ignore line ending differences in git diff --git a/.mergify.yml b/.mergify.yml index 258627d1..db3438bc 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -22,7 +22,7 @@ pull_request_rules: - status-success=Build and Test (macos-latest, 2.12, temurin@8, sbt-typelevelJVM) - status-success=Build and Test (windows-latest, 2.12, temurin@8, sbt-typelevelJVM) - status-success=Validate Steward Config (ubuntu-latest, temurin@11) - - status-success=Generate Site (ubuntu-latest, temurin@8) + - status-success=Generate Site (ubuntu-latest, temurin@11) - '#approved-reviews-by>=1' actions: merge: {} diff --git a/docs/customization.md b/docs/customization.md index 81df02f7..8f157d43 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -113,6 +113,7 @@ Using this plugin the following 2 settings have new default values: - `tlSiteApiModule` (setting): The module that publishes API docs (default: `None`). - `tlSiteApiPackage` (setting): The top-level package for your API docs (e.g. org.typlevel.sbt). - `tlSiteKeepFiles` (setting): Whether to keep existing files when deploying site (default: `true`). +- `tlSiteJavaVersion` (setting): The Java version to use for the site job, must be >= 11 (default: first compatible choice from `githubWorkflowJavaVersions`, otherwise Temurin 11). - `tlSiteGenerate` (setting): A sequence of workflow steps which generates the site (default: `[Sbt(List("tlSite"))]`). - `tlSitePublish` (setting): A sequence of workflow steps which publishes the site (default: `peaceiris/actions-gh-pages`). - `tlSitePublishBranch` (setting): The branch to publish the site from on every push. Set this to `None` if you only want to update the site on tag releases. (default: `main`) diff --git a/site/src/main/scala/org/typelevel/sbt/TypelevelSitePlugin.scala b/site/src/main/scala/org/typelevel/sbt/TypelevelSitePlugin.scala index 4cc51453..fe5a2dcd 100644 --- a/site/src/main/scala/org/typelevel/sbt/TypelevelSitePlugin.scala +++ b/site/src/main/scala/org/typelevel/sbt/TypelevelSitePlugin.scala @@ -31,6 +31,7 @@ import sbt.Keys._ import sbt._ import scala.annotation.nowarn +import scala.util.Try object TypelevelSitePlugin extends AutoPlugin { @@ -58,6 +59,8 @@ object TypelevelSitePlugin extends AutoPlugin { lazy val tlSiteKeepFiles = settingKey[Boolean]("Whether to keep existing files when deploying site (default: true)") + lazy val tlSiteJavaVersion = settingKey[JavaSpec]( + "The Java version to use for the site job, must be >= 11 (default: first compatible choice from `githubWorkflowJavaVersions`, otherwise Temurin 11)") lazy val tlSiteGenerate = settingKey[Seq[WorkflowStep]]( "A sequence of workflow steps which generates the site (default: [Sbt(List(\"tlSite\"))])") lazy val tlSitePublish = settingKey[Seq[WorkflowStep]]( @@ -92,6 +95,20 @@ object TypelevelSitePlugin extends AutoPlugin { tlSiteApiPackage := None, tlSiteRelatedProjects := Nil, tlSiteKeepFiles := true, + tlSiteJavaVersion := { + githubWorkflowJavaVersions + .value + .collectFirst { + case spec @ JavaSpec(_, version) + if version + .split('.') + .lift(0) + .flatMap(v => Try(v.toInt).toOption) + .exists(_ >= 11) => + spec + } + .getOrElse(JavaSpec.temurin("11")) + }, homepage := { gitHubUserRepo.value.map { case ("typelevel", repo) => url(s"https://typelevel.org/$repo") @@ -209,16 +226,25 @@ object TypelevelSitePlugin extends AutoPlugin { List.empty } }, - ThisBuild / githubWorkflowAddedJobs += + ThisBuild / githubWorkflowAddedJobs += { + + val extraJava = + if (!githubWorkflowJavaVersions.value.contains(tlSiteJavaVersion.value)) + WorkflowStep.SetupJava(List(tlSiteJavaVersion.value)) + else Nil + WorkflowJob( "site", "Generate Site", scalas = List.empty, sbtStepPreamble = List.empty, - javas = List(githubWorkflowJavaVersions.value.head), - steps = - githubWorkflowJobSetup.value.toList ++ tlSiteGenerate.value ++ tlSitePublish.value + javas = List(tlSiteJavaVersion.value), + steps = githubWorkflowJobSetup.value.toList ++ + extraJava ++ + tlSiteGenerate.value ++ + tlSitePublish.value ) + } ) private def previewTask = Def From 65beed564d69356cc6162f51a7801cf8943bd0a8 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Tue, 7 Nov 2023 18:46:46 -0800 Subject: [PATCH 5/5] `lift(0)` -> `headOption` --- site/src/main/scala/org/typelevel/sbt/TypelevelSitePlugin.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/src/main/scala/org/typelevel/sbt/TypelevelSitePlugin.scala b/site/src/main/scala/org/typelevel/sbt/TypelevelSitePlugin.scala index fe5a2dcd..21ad6e3f 100644 --- a/site/src/main/scala/org/typelevel/sbt/TypelevelSitePlugin.scala +++ b/site/src/main/scala/org/typelevel/sbt/TypelevelSitePlugin.scala @@ -102,7 +102,7 @@ object TypelevelSitePlugin extends AutoPlugin { case spec @ JavaSpec(_, version) if version .split('.') - .lift(0) + .headOption .flatMap(v => Try(v.toInt).toOption) .exists(_ >= 11) => spec