-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.mill
More file actions
68 lines (58 loc) · 1.92 KB
/
build.mill
File metadata and controls
68 lines (58 loc) · 1.92 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//| mill-version: 1.1.2
// SPDX-FileCopyrightText: © 2025-2026 Andreas Wendleder
// SPDX-License-Identifier: CERN-OHL-S-2.0
package build
import mill._
import mill.scalalib._
import mill.api.BuildCtx
trait BorgModule extends ScalaModule {
def scalaVersion = "2.13.18"
def chiselVersion = "7.11.0"
override def mvnDeps = Task {
super.mvnDeps() ++ Seq(
mvn"org.chipsalliance::chisel:$chiselVersion"
)
}
override def scalacPluginMvnDeps = Task {
super.scalacPluginMvnDeps() ++ Seq(
mvn"org.chipsalliance:::chisel-plugin:$chiselVersion"
)
}
override def scalacOptions = Task {
super.scalacOptions() ++ Seq(
"-feature",
"-language:reflectiveCalls",
"-deprecation",
"-Xcheckinit",
"-Xsource:3"
)
}
object test extends ScalaTests with TestModule.Utest {
override def forkEnv = Task {
super.forkEnv() ++ Map(
"PROJECT_ROOT" -> BuildCtx.workspaceRoot.toString()
)
}
override def mvnDeps = Task {
super.mvnDeps() ++ Seq(
mvn"com.lihaoyi::utest:0.9.5",
mvn"com.lihaoyi::upickle:4.4.3",
mvn"com.lihaoyi::os-lib:0.11.8"
)
}
// --- How to run a single test or test class ---
//
// Run all tests in one class (e.g. BorgTests):
// mill hardware.borg.test.testOnly borg.BorgTests
//
// Run a single test method (class glob before --, full utest path after --):
// mill hardware.borg.test.testOnly borg.BorgTests -- borg.BorgTests.hw_flusher_autonomous
//
// The part after -- is the utest query selector (full dotted path from package root).
// utest uses sbt.testing.Framework as its interface; `-- <path>` is passed as
// args(0) to BaseRunner, which filters both the class and the individual test.
//
// Note: `mill hardware.borg.test -- borg.BorgTests.foo` does NOT work —
// mill does not forward -- args to the sbt testing runner that way.
}
}