Skip to content

Commit

Permalink
Set MIMA plugin for the project (#560)
Browse files Browse the repository at this point in the history
* Set MIMA plugin for the project
  • Loading branch information
pomadchin authored Sep 5, 2021
1 parent 3ffafad commit 5ab4268
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ jobs:
- name: Upload Codecov Results
run: codecov -F ${{ matrix.scala }}

- name: Binary compatibility check
run: sbt ++${{ matrix.scala }} mimaReportBinaryIssues

publish:
name: Publish Artifacts
needs: [build]
Expand Down
14 changes: 13 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,20 @@ val irrecVersion = "0.4.0"

val Scala212 = "2.12.14"

val previousVersion = "0.10.1"

ThisBuild / versionScheme := Some("semver-spec")

ThisBuild / crossScalaVersions := Seq(Scala212)
ThisBuild / scalaVersion := (ThisBuild / crossScalaVersions).value.last

ThisBuild / mimaFailOnNoPrevious := false

lazy val root = Project("frameless", file("." + "frameless")).in(file("."))
.aggregate(core, cats, dataset, ml, docs)
.settings(framelessSettings: _*)
.settings(noPublishSettings: _*)
.settings(mimaPreviousArtifacts := Set())

lazy val core = project
.settings(name := "frameless-core")
Expand Down Expand Up @@ -88,6 +93,7 @@ lazy val docs = project
"-Ydelambdafy:inline"
)
)
.settings(mimaPreviousArtifacts := Set())
.dependsOn(dataset, cats, ml)

lazy val framelessSettings = Seq(
Expand Down Expand Up @@ -120,7 +126,8 @@ lazy val framelessSettings = Seq(
"org.scalacheck" %% "scalacheck" % scalacheck % "test"),
Test / javaOptions ++= Seq("-Xmx1G", "-ea"),
Test / fork := true,
Test / parallelExecution := false
Test / parallelExecution := false,
mimaPreviousArtifacts := Set("org.typelevel" %% name.value % previousVersion)
) ++ consoleSettings

lazy val consoleSettings = Seq(
Expand Down Expand Up @@ -229,6 +236,11 @@ ThisBuild / githubWorkflowBuild := Seq(
)
)

ThisBuild / githubWorkflowBuild += WorkflowStep.Sbt(
List("mimaReportBinaryIssues"),
name = Some("Binary compatibility check")
)

ThisBuild / githubWorkflowPublishTargetBranches := Seq(
RefPredicate.Equals(Ref.Branch("master")),
RefPredicate.StartsWith(Ref.Tag("v"))
Expand Down
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.2")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.13.0")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.23")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.0.0")

0 comments on commit 5ab4268

Please sign in to comment.