From 09c4baf90ca61c06fd87467110f62db5b6a999c2 Mon Sep 17 00:00:00 2001 From: Jiuyang Liu Date: Mon, 22 Mar 2021 19:35:04 +0000 Subject: Fix mill compile and add to CI (#2147) * fix for #2071 * add mill compile to CI--- .github/workflows/test.yml | 18 ++++++++++++++++++ build.sc | 9 ++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f6af7cbd..4e0c8125 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,6 +46,24 @@ jobs: - name: Binary compatibility run: sbt ++${{ matrix.scala }} mimaReportBinaryIssues + mill: + name: Mill Sanity Check + runs-on: ubuntu-latest + strategy: + matrix: + scala: [2.13.4, 2.12.13] + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Scala + uses: olafurpg/setup-scala@v10 + - name: Cache + uses: coursier/cache-action@v5 + - name: Setup Mill + uses: jodersky/setup-mill@v0.2.3 + - name: Mill sanity check + run: mill _[${{ matrix.scala }}].compile + # TODO find better way to express Ops and AddNot as single test equiv: name: formal equivalence diff --git a/build.sc b/build.sc index 89796964..232552b7 100644 --- a/build.sc +++ b/build.sc @@ -7,7 +7,7 @@ import mill.modules.Util import $ivy.`com.lihaoyi::mill-contrib-buildinfo:$MILL_VERSION` import mill.contrib.buildinfo.BuildInfo -object firrtl extends mill.Cross[firrtlCrossModule]("2.12.12", "2.13.2") +object firrtl extends mill.Cross[firrtlCrossModule]("2.12.13", "2.13.4") class firrtlCrossModule(val crossScalaVersion: String) extends CrossSbtModule with PublishModule with BuildInfo { override def millSourcePath = super.millSourcePath / os.up @@ -28,7 +28,7 @@ class firrtlCrossModule(val crossScalaVersion: String) extends CrossSbtModule wi "-deprecation", "-unchecked", "-Yrangepos" // required by SemanticDB compiler plugin - ) + ) ++ (if (majorVersion == 13) Seq("-Ymacro-annotations") else Nil) } override def javacOptions = T { @@ -42,16 +42,19 @@ class firrtlCrossModule(val crossScalaVersion: String) extends CrossSbtModule wi ivy"net.jcazevedo::moultingyaml:0.4.2", ivy"org.json4s::json4s-native:3.6.9", ivy"org.apache.commons:commons-text:1.8", + ivy"io.github.alexarchambault::data-class:0.2.5", ivy"org.antlr:antlr4-runtime:$antlr4Version", ivy"com.google.protobuf:protobuf-java:$protocVersion" ) ++ { - if (majorVersion > 12) + if (majorVersion == 13) Agg(ivy"org.scala-lang.modules::scala-parallel-collections:0.2.0") else Agg() } } + override def scalacPluginIvyDeps = if (majorVersion == 12) Agg(ivy"org.scalamacros:::paradise:2.1.1") else super.scalacPluginIvyDeps + object test extends Tests { override def ivyDeps = T { Agg( -- cgit v1.2.3