File tree Expand file tree Collapse file tree 2 files changed +67
-1
lines changed Expand file tree Collapse file tree 2 files changed +67
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Binary Compatibility
2+
3+ on :
4+ pull_request :
5+ push :
6+ branches : [ main ]
7+ tags-ignore : [ v* ]
8+
9+ concurrency :
10+ # Only run once for latest commit per ref and cancel other (previous) runs.
11+ group : ci-${{ github.ref }}
12+ cancel-in-progress : true
13+
14+ permissions : { }
15+
16+ jobs :
17+ check-binary-compatibility :
18+ name : Check / Binary Compatibility
19+ runs-on : ubuntu-20.04
20+ if : github.repository == 'apache/incubator-pekko-http'
21+ strategy :
22+ fail-fast : false
23+ matrix :
24+ SCALA_VERSION : [ 2.12, 2.13, 3.3 ]
25+ steps :
26+ - name : Checkout
27+ uses : actions/checkout@v4
28+ with :
29+ fetch-depth : 0
30+ fetch-tags : 0
31+
32+ - name : Setup Java 11
33+ uses : actions/setup-java@v3
34+ with :
35+ distribution : temurin
36+ java-version : 11
37+
38+ - name : Cache Coursier cache
39+ 40+
41+ - name : Enable jvm-opts
42+ run : cp .jvmopts-ci .jvmopts
43+
44+ - name : Compile code
45+ run : sbt ++${{ matrix.SCALA_VERSION }} Test/compile
46+
47+ - name : Report MiMa Binary Issues with Scala ${{ matrix.SCALA_VERSION }}
48+ run : sbt -Dpekko.http.parallelExecution=false -Dpekko.test.timefactor=2 ++${{ matrix.SCALA_VERSION }} mimaReportBinaryIssues
49+
50+ - name : Check correct MiMa filter directories
51+ run : |
52+ sbt checkMimaFilterDirectories
Original file line number Diff line number Diff line change @@ -20,10 +20,14 @@ import com.typesafe.tools.mima.plugin.MimaPlugin.autoImport._
2020import scala .util .Try
2121
2222object MiMa extends AutoPlugin {
23+ private val latestPatchOf10 = 0
2324
2425 override def requires = MimaPlugin
2526 override def trigger = allRequirements
2627
28+ val checkMimaFilterDirectories =
29+ taskKey[Unit ](" Check that the mima directories are correct compared to latest version" )
30+
2731 override val projectSettings = Seq (
2832 mimaPreviousArtifacts := {
2933 val versions = Set (" 1.0.0" )
@@ -48,7 +52,17 @@ object MiMa extends AutoPlugin {
4852 }
4953
5054 Map .empty
51- })
55+ },
56+ checkMimaFilterDirectories := checkFilterDirectories(baseDirectory.value))
57+
58+ def checkFilterDirectories (moduleRoot : File ): Unit = {
59+ val nextVersionFilterDir =
60+ moduleRoot / " src" / " main" / " mima-filters" / s " 1.0. ${latestPatchOf10 + 1 }.backwards.excludes "
61+ if (nextVersionFilterDir.exists()) {
62+ throw new IllegalArgumentException (s " Incorrect mima filter directory exists: ' $nextVersionFilterDir' " +
63+ s " should be with number from current release ' ${moduleRoot / " src" / " main" / " mima-filters" / s " 1.0. $latestPatchOf10.backwards.excludes " }" )
64+ }
65+ }
5266
5367 def latestForkVersion (fork : String , allVersions : Seq [String ]): String =
5468 allVersions
You can’t perform that action at this time.
0 commit comments