From 06df5295c4c709664ffeb0e3232fd90775867fbd Mon Sep 17 00:00:00 2001 From: Lorenzo Gabriele Date: Wed, 28 Jul 2021 20:59:57 +0200 Subject: [PATCH] Add mill-mima to check binary compatibility --- .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 6208e0d..c35b0c4 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/geny' && contains(github.ref, 'refs/tags/') diff --git a/build.sc b/build.sc index ed0703c..e8486d9 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 dottyCustomVersion = sys.props.get("dottyVersion") @@ -23,11 +25,13 @@ val scalaNativeVersions = for { scalaNativeV <- Seq("0.4.0") } yield (scalaV, scalaNativeV) -trait GenyPublishModule extends PublishModule { +trait GenyPublishModule extends PublishModule with Mima { def artifactName = "geny" def publishVersion = VcsVersion.vcsState().format() + def mimaPreviousVersions = VcsVersion.vcsState().lastTag.toSeq + def pomSettings = PomSettings( description = artifactName(), organization = "com.lihaoyi",