forked from OSCPU/NutShell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sc
45 lines (36 loc) · 1.26 KB
/
build.sc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import mill._, scalalib._
import coursier.maven.MavenRepository
object ivys {
val scala = "2.13.10"
val chisel3 = ivy"edu.berkeley.cs::chisel3:3.5.6"
val chisel3Plugin = ivy"edu.berkeley.cs:::chisel3-plugin:3.5.6"
}
trait CommonModule extends ScalaModule {
override def scalaVersion = ivys.scala
override def scalacOptions = Seq("-Ymacro-annotations") ++
Seq("-Xfatal-warnings", "-feature", "-deprecation", "-language:reflectiveCalls")
}
trait HasChisel3 extends ScalaModule {
override def repositoriesTask = T.task {
super.repositoriesTask() ++ Seq(
MavenRepository("https://oss.sonatype.org/content/repositories/snapshots")
)
}
override def ivyDeps = Agg(ivys.chisel3)
override def scalacPluginIvyDeps = Agg(ivys.chisel3Plugin)
}
trait HasChiselTests extends SbtModule {
object test extends SbtModuleTests with TestModule.ScalaTest {
override def ivyDeps = Agg(ivy"edu.berkeley.cs::chiseltest:0.5.4")
}
}
trait CommonNS extends SbtModule with CommonModule with HasChisel3
object difftest extends CommonNS {
override def millSourcePath = os.pwd / "difftest"
}
object chiselModule extends CommonNS with HasChiselTests {
override def millSourcePath = os.pwd
override def moduleDeps = super.moduleDeps ++ Seq(
difftest
)
}