Skip to content

Commit 23d6c30

Browse files
authored
Bump mill from 0.11.5 to 0.12.5 (#133)
Signed-off-by: Qiming Chu <cchuqiming@gmail.com>
1 parent f09569b commit 23d6c30

File tree

6 files changed

+19
-9
lines changed

6 files changed

+19
-9
lines changed

.github/workflows/template-cleanup.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
4242
# Replace placeholders
4343
sed -i "s/%NAME%/$NAME/g" build.sbt README.md src/test/scala/gcd/*
44-
sed -i "s/%NAME%/$WRAPPED_NAME/g" build.sc
44+
sed -i "s/%NAME%/$WRAPPED_NAME/g" build.mill
4545
sed -i "s/%REPOSITORY%/${GITHUB_REPOSITORY/\//\\/}/g" README.md
4646
sed -i "s/%ORGANIZATION%/$GROUP/g" build.sbt
4747

.github/workflows/test.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@ jobs:
1919
- name: Checkout
2020
uses: actions/checkout@v4
2121
- name: Cleanup
22-
run: sed -i "s/%NAME%/test/g" build.sc
22+
run: sed -i "s/%NAME%/test/g" build.mill
2323
- name: Cache Scala
2424
uses: coursier/cache-action@v6
2525
- name: Setup Scala
2626
uses: coursier/setup-action@v1
2727
with:
2828
jvm: adopt:11
29-
apps: sbt mill
29+
apps: sbt
30+
- name: Setup Mill
31+
run: |
32+
curl -L https://github.com/com-lihaoyi/mill/releases/download/0.12.5/0.12.5 > mill && chmod +x mill
3033
- name: Setup Dependencies
3134
run: |
3235
sudo apt-get install ccache
@@ -56,4 +59,4 @@ jobs:
5659
- name: SBT Test
5760
run: sbt test
5861
- name: mill Test
59-
run: mill _.test
62+
run: ./mill _.test

.mill-jvm-opts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-Dchisel.project.root=${PWD}

.mill-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.11.5
1+
0.12.5

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ with a clean running [Chisel3](https://www.chisel-lang.org/) project.
99

1010
### Dependencies
1111

12-
#### JDK 8 or newer
12+
#### JDK 11 or newer
1313

14-
We recommend LTS releases Java 8 and Java 11. You can install the JDK as your operating system recommends, or use the prebuilt binaries from [AdoptOpenJDK](https://adoptopenjdk.net/).
14+
We recommend using Java 11 or later LTS releases. While Chisel itself works with Java 8, our preferred build tool Mill requires Java 11. You can install the JDK as your operating system recommends, or use the prebuilt binaries from [Adoptium](https://adoptium.net/) (formerly AdoptOpenJDK).
1515

1616
#### SBT or mill
1717

build.sc build.mill

+8-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@ import scalalib._
77
// support BSP
88
import mill.bsp._
99

10+
// Note: This project requires .mill-jvm-opts file containing:
11+
// -Dchisel.project.root=${PWD}
12+
// This is needed because Chisel needs to know the project root directory
13+
// to properly generate and handle test directories and output files.
14+
// See: https://github.com/com-lihaoyi/mill/issues/3840
15+
1016
object %NAME% extends SbtModule { m =>
11-
override def millSourcePath = os.pwd
17+
override def millSourcePath = super.millSourcePath / os.up
1218
override def scalaVersion = "2.13.15"
1319
override def scalacOptions = Seq(
1420
"-language:reflectiveCalls",
@@ -22,7 +28,7 @@ object %NAME% extends SbtModule { m =>
2228
override def scalacPluginIvyDeps = Agg(
2329
ivy"org.chipsalliance:::chisel-plugin:6.6.0",
2430
)
25-
object test extends SbtModuleTests with TestModule.ScalaTest {
31+
object test extends SbtTests with TestModule.ScalaTest {
2632
override def ivyDeps = m.ivyDeps() ++ Agg(
2733
ivy"org.scalatest::scalatest::3.2.16"
2834
)

0 commit comments

Comments
 (0)