Skip to content

Commit 40c1f46

Browse files
authored
Restore binary compatibility checking (#5028)
1 parent 37789a0 commit 40c1f46

File tree

5 files changed

+26
-2
lines changed

5 files changed

+26
-2
lines changed

.github/workflows/enable-bincompat-checking.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
run: |
7676
VERSION=${{ needs.determine_version.outputs.version }}
7777
VERSION_NO_V=${VERSION#v}
78-
echo $VERSION_NO_V >> project/previous-versions.txt
78+
echo $VERSION_NO_V >> etc/previous-versions.txt
7979
- name: Open PR
8080
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
8181
with:

.github/workflows/test.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,23 @@ jobs:
9191
- name: Test
9292
run: ./mill -j0 firrtl.cross[].test -oF + svsim.cross[].test -oF + chisel[].test -oF
9393

94+
mima:
95+
name: binary compatibility checking
96+
runs-on: ${{ inputs.system }}
97+
98+
steps:
99+
- name: Checkout
100+
uses: actions/checkout@v4
101+
with:
102+
ref: ${{ inputs.ref }}
103+
- name: Setup Java
104+
uses: actions/setup-java@v4
105+
with:
106+
distribution: 'adopt'
107+
java-version: ${{ inputs.jvm }}
108+
- name: Check Binary Compatibility with MiMa
109+
run: ./mill __.mimaReportBinaryIssues
110+
94111
mill:
95112
name: compile project with mill
96113
runs-on: ubuntu-24.04

build.mill

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
//| - com.lihaoyi::mill-contrib-jmh:$MILL_VERSION
44
//| - com.47deg::github4s:0.33.3
55
//| - com.lumidion::sonatype-central-client-requests:0.6.0
6+
//| - com.github.lolgab::mill-mima::0.2.0
67

78
package build
89

etc/previous-versions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7.0.0

release.mill

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import mill.scalalib._
77
import mill.scalalib.scalafmt._
88
import mill.scalalib.publish._
99
import mill.util.Jvm.createJar
10+
import com.github.lolgab.mill.mima.Mima
1011

1112
//import de.tobiasroeser.mill.vcs.version.VcsVersion
1213

@@ -33,7 +34,7 @@ trait ChiselPublishModule extends SonatypeCentralPublishModule {
3334

3435
/** Aggregate project for publishing Chisel as a single artifact
3536
*/
36-
trait Unipublish extends ScalaModule with ChiselPublishModule {
37+
trait Unipublish extends ScalaModule with ChiselPublishModule with Mima {
3738

3839
def scalaVersion = v.scalaVersion
3940

@@ -43,6 +44,10 @@ trait Unipublish extends ScalaModule with ChiselPublishModule {
4344
// This is published as chisel
4445
override def artifactName = "chisel"
4546

47+
override def mimaPreviousVersions = Task.Input {
48+
os.read.lines(BuildCtx.workspaceRoot / "etc" / "previous-versions.txt")
49+
}
50+
4651
/** Publish both this project and the plugin (for the default Scala version) */
4752
override def publishLocal(
4853
localMvnRepo: String = null,

0 commit comments

Comments
 (0)