Skip to content

Commit

Permalink
Merge pull request #259 from Dwolla/mima
Browse files Browse the repository at this point in the history
add MiMa checking
  • Loading branch information
bpholt authored May 27, 2022
2 parents 0e3bc20 + 78a1630 commit 06114ea
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- name: Check that workflows are up to date
run: sbt ++${{ matrix.scala }} githubWorkflowCheck

- run: sbt ++${{ matrix.scala }} test doc
- run: sbt ++${{ matrix.scala }} test mimaReportBinaryIssues doc

- name: Compress target directories
run: tar cf targets.tar target core/js/target core/jvm/target aws-java-sdk2/target project/target
Expand Down
17 changes: 7 additions & 10 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
lazy val primaryName = "fs2-aws"
lazy val fs2Version = "3.2.7"

inThisBuild(List(
Expand All @@ -18,7 +17,7 @@ inThisBuild(List(
startYear := Option(2018),
resolvers += Resolver.sonatypeRepo("releases"),

githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("test", "doc"))),
githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("test", "mimaReportBinaryIssues", "doc"))),
githubWorkflowJavaVersions := Seq(JavaSpec.temurin("8"), JavaSpec.temurin("11")),
githubWorkflowTargetTags ++= Seq("v*"),
githubWorkflowPublishTargetBranches :=
Expand All @@ -34,6 +33,7 @@ inThisBuild(List(
)
)
),
localMimaPreviousVersions := Set("3.0.0-RC1"),
))

lazy val compilerOptions = Seq(
Expand All @@ -54,27 +54,23 @@ lazy val compilerOptions = Seq(
},
)

lazy val fs2Utils = crossProject(JSPlatform, JVMPlatform)
lazy val `fs2-utils` = crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Full)
.in(file("core"))
.settings(compilerOptions: _*)
.settings(
name := "fs2-utils",
description := "Helpful utility functions for fs2 streams",
libraryDependencies ++= Seq(
"co.fs2" %%% "fs2-core" % fs2Version,
"org.scalameta" %%% "munit" % "0.7.29" % Test,
"com.eed3si9n.expecty" %%% "expecty" % "0.15.4" % Test,
"org.typelevel" %%% "munit-cats-effect-3" % "1.0.7" % Test,
)
),
)

lazy val fs2UtilsJVM = fs2Utils.jvm

lazy val fs2Aws2Utils = (project in file("aws-java-sdk2"))
lazy val `fs2-aws-java-sdk2` = (project in file("aws-java-sdk2"))
.settings(compilerOptions: _*)
.settings(
name := primaryName + "-java-sdk2",
description := "Utility classes for interacting with the V2 AWS Java SDKs from Scala using fs2",
libraryDependencies ++= {
Seq(
Expand All @@ -89,5 +85,6 @@ lazy val fs2Aws2Utils = (project in file("aws-java-sdk2"))
lazy val `fs2-aws` = (project in file("."))
.settings(
publish / skip := true,
publishArtifact := false,
)
.aggregate(fs2UtilsJVM, fs2Utils.js, fs2Aws2Utils)
.aggregate(`fs2-utils`.jvm, `fs2-utils`.js, `fs2-aws-java-sdk2`)
29 changes: 29 additions & 0 deletions project/LocalMimaSettings.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import com.typesafe.tools.mima.plugin.MimaPlugin
import sbt._
import sbt.Keys._

object LocalMimaSettings extends AutoPlugin {
override def requires = MimaPlugin
override def trigger = allRequirements

object autoImport {
lazy val localMimaPreviousVersions = settingKey[Set[String]]("A set of previous versions to compare binary-compatibility against")
}

import autoImport._
import MimaPlugin.autoImport._

override def projectSettings = Seq[Setting[_]](
mimaPreviousArtifacts := {
if (publishArtifact.value)
localMimaPreviousVersions.value.map {
projectID
.value
.withRevision(_)
.withExplicitArtifacts(Vector.empty)
}
else
Set.empty
},
)
}
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0")
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.3.1")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.13")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.0")

addSbtPlugin("org.scalablytyped.converter" % "sbt-converter" % "1.0.0-beta37")

0 comments on commit 06114ea

Please sign in to comment.