From ce342b5d8ee6d7803357d983c43b938e71ec9e13 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Wed, 26 Jan 2022 14:32:59 +0100 Subject: [PATCH 1/5] Update sbt-typelevel, sbt-typelevel-site to 0.4.3 --- core/build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/build.sbt b/core/build.sbt index e8958ff..7b76eb0 100644 --- a/core/build.sbt +++ b/core/build.sbt @@ -1,4 +1,4 @@ -val sbtTypelevelVersion = "0.4.1" +val sbtTypelevelVersion = "0.4.3" addSbtPlugin("org.typelevel" % "sbt-typelevel" % sbtTypelevelVersion) addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % sbtTypelevelVersion) addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16") From fc84732c03f1f1d5b996a68afd7294f4101e2fb4 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 26 Jan 2022 13:45:50 +0000 Subject: [PATCH 2/5] Bump base version --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 606e8ce..d25526d 100644 --- a/build.sbt +++ b/build.sbt @@ -15,7 +15,7 @@ lazy val core = project lazy val docs = project.in(file("site")).enablePlugins(Http4sOrgSitePlugin) -ThisBuild / tlBaseVersion := "0.10" +ThisBuild / tlBaseVersion := "0.11" ThisBuild / crossScalaVersions := Seq("2.12.15") ThisBuild / developers := List( Developer( From 23c028810759dd4fd6c48b863f68216da4e962a0 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 26 Jan 2022 13:48:07 +0000 Subject: [PATCH 3/5] Only check unused deps on primary Java --- core/src/main/scala/org/http4s/sbt/Http4sOrgPlugin.scala | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/src/main/scala/org/http4s/sbt/Http4sOrgPlugin.scala b/core/src/main/scala/org/http4s/sbt/Http4sOrgPlugin.scala index 73307f2..97ce6da 100644 --- a/core/src/main/scala/org/http4s/sbt/Http4sOrgPlugin.scala +++ b/core/src/main/scala/org/http4s/sbt/Http4sOrgPlugin.scala @@ -44,10 +44,17 @@ object Http4sOrgPlugin extends AutoPlugin { githubWorkflowBuildPostamble ++= Seq( WorkflowStep.Sbt( List("unusedCompileDependenciesTest"), - name = Some("Check unused compile dependencies")) + name = Some("Check unused compile dependencies"), + cond = Some(primaryJavaCond.value) + ) ), githubWorkflowBuildMatrixFailFast := Some(false), githubWorkflowTargetBranches := Seq("**") ) + private val primaryJavaCond = Def.setting { + val java = githubWorkflowJavaVersions.value.head + s"matrix.java == '${java.render}'" + } + } From f10b853cbfb49f36a92ccc229c303234e1084694 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 26 Jan 2022 13:51:01 +0000 Subject: [PATCH 4/5] Fix val init order --- core/src/main/scala/org/http4s/sbt/Http4sOrgPlugin.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/scala/org/http4s/sbt/Http4sOrgPlugin.scala b/core/src/main/scala/org/http4s/sbt/Http4sOrgPlugin.scala index 97ce6da..add2243 100644 --- a/core/src/main/scala/org/http4s/sbt/Http4sOrgPlugin.scala +++ b/core/src/main/scala/org/http4s/sbt/Http4sOrgPlugin.scala @@ -32,13 +32,13 @@ object Http4sOrgPlugin extends AutoPlugin { override def buildSettings = organizationSettings ++ githubActionsSettings - val organizationSettings: Seq[Setting[_]] = + lazy val organizationSettings: Seq[Setting[_]] = Seq( organization := "org.http4s", organizationName := "http4s.org" ) - val githubActionsSettings: Seq[Setting[_]] = + lazy val githubActionsSettings: Seq[Setting[_]] = Seq( githubWorkflowJavaVersions := List("8", "11", "17").map(JavaSpec.temurin(_)), githubWorkflowBuildPostamble ++= Seq( From 2dbccb0a1f29c65a0948b801e174ed877479d48d Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Wed, 26 Jan 2022 13:51:13 +0000 Subject: [PATCH 5/5] Regenerate workflow --- .github/workflows/ci.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea0c4b8..9eea216 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,30 +74,37 @@ jobs: run: sbt '++${{ matrix.scala }}' 'project /' githubWorkflowCheck - name: Check headers and formatting + if: matrix.java == 'temurin@8' run: sbt '++${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck - name: Test run: sbt '++${{ matrix.scala }}' test - name: Check binary compatibility + if: matrix.java == 'temurin@8' run: sbt '++${{ matrix.scala }}' mimaReportBinaryIssues - name: Generate API documentation + if: matrix.java == 'temurin@8' run: sbt '++${{ matrix.scala }}' doc - name: Check unused compile dependencies + if: matrix.java == 'temurin@8' run: sbt '++${{ matrix.scala }}' unusedCompileDependenciesTest - name: Make target directories + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') run: mkdir -p target core/target site/target project/target - name: Compress target directories + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') run: tar cf targets.tar target core/target site/target project/target - name: Upload target directories + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') uses: actions/upload-artifact@v2 with: - name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }} + name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }} path: targets.tar publish: @@ -152,7 +159,7 @@ jobs: - name: Download target directories (2.12.15) uses: actions/download-artifact@v2 with: - name: target-${{ matrix.os }}-2.12.15-${{ matrix.java }} + name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.15 - name: Inflate target directories (2.12.15) run: | @@ -221,7 +228,7 @@ jobs: key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - name: Generate site - run: sbt '++${{ matrix.scala }}' tlSite + run: sbt '++${{ matrix.scala }}' docs/tlSite - name: Publish site if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'