From 219ec0cf03d75ef5a51673fbf38209b134d4eb57 Mon Sep 17 00:00:00 2001 From: Lorenzo Gabriele Date: Wed, 28 Jul 2021 22:00:34 +0200 Subject: [PATCH] Add mill-mima to check binary compatibility (#39) --- .github/workflows/actions.yml | 11 +++++++++++ build.sc | 6 +++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 953bdb4..639c758 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -16,6 +16,17 @@ jobs: java-version: 8 - name: Run tests run: ./mill -i all __.publishArtifacts __.test + check-binary-compatibility: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Check Binary Compatibility + run: ./mill -i __.mimaReportBinaryIssues publish-sonatype: if: github.repository == 'com-lihaoyi/fansi' && contains(github.ref, 'refs/tags/') diff --git a/build.sc b/build.sc index 82d08b4..7e19366 100644 --- a/build.sc +++ b/build.sc @@ -1,6 +1,8 @@ import mill._, scalalib._, scalajslib._, scalanativelib._, publish._ import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version_mill0.9:0.1.1` import de.tobiasroeser.mill.vcs.version.VcsVersion +import $ivy.`com.github.lolgab::mill-mima_mill0.9:0.0.4` +import com.github.lolgab.mill.mima._ val dottyVersions = sys.props.get("dottyVersion").toList @@ -18,11 +20,13 @@ val scalaNativeVersions = for { scalaNativeV <- Seq("0.4.0") } yield (scalaV, scalaNativeV) -trait FansiModule extends PublishModule { +trait FansiModule extends PublishModule with Mima { def artifactName = "fansi" def publishVersion = VcsVersion.vcsState().format() + def mimaPreviousVersions = VcsVersion.vcsState().lastTag.toSeq + def pomSettings = PomSettings( description = artifactName(), organization = "com.lihaoyi",