Skip to content

Commit

Permalink
Simplify CI config (#4117)
Browse files Browse the repository at this point in the history
Some cleanup in preparation for
#4118

Set default `--jobs=0.5C` in `.mill-opts` so we don't need to specify it
explicitly in CI, and it also works on laptops and other environments
with different core counts correctly. TBH could probably go with even
less parallelism due to how heavy our integration tests are - with all
the compilation and JVM subprocess spawning they can probably easily
take up all 4 cores on a Github Actions worker - but I'm leaving it at
0.5C X 4 cores = 2x parallelism in CI for now

Also simplified the windows CI setup: now that we have `./mill.bat` in
the project root, we can just call `./mill` in the windows terminal. I
had to delete the `.ps1` version because it was taking priority over
`.bat` and failing with the following error:

```
Run ./mill -i -k __.compile
  
mill.ps1: D:\a\_temp\93d23[8](https://github.com/com-lihaoyi/mill/actions/runs/12292451871/job/34303135448#step:11:8)[8](https://github.com/com-lihaoyi/mill/actions/runs/12292451871/job/34303135448#step:11:9)4-066d-433e-bb26-8539b01a4aee.ps1:2
Line |
   2 |  ./mill -i -k __.compile
     |         ~~
     | Parameter cannot be processed because the parameter name 'i' is ambiguous. Possible matches include:
     | -InformationAction -InformationVariable.
Error: Process completed with exit code 1.
```
  • Loading branch information
lihaoyi authored Dec 12, 2024
1 parent 56ffd08 commit aea16b7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 146 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/run-mill-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,8 @@ jobs:
if: inputs.buildcmd != ''

- name: Run Mill '${{ inputs.millargs }}'
# Mill tests are pretty heavy so run them only 3x parallel on 4 core Github Actions runners
run: ./mill -i -j3 -k ${{ inputs.millargs }}
if: inputs.millargs != '' && !startsWith(inputs.os, 'windows')

- name: Run Mill (on Windows) '${{ inputs.millargs }}'
run: cmd /C %GITHUB_WORKSPACE%\mill.bat -i -j3 -k ${{ inputs.millargs }}
if: inputs.millargs != '' && startsWith(inputs.os, 'windows')
run: ./mill -i -k ${{ inputs.millargs }}
if: inputs.millargs != ''

- name: Run Mill (on Windows) Worker Cleanup
run: 'taskkill -f -im java* && rm -rf out/mill-server/*'
Expand Down
1 change: 1 addition & 0 deletions .mill-opts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--jobs=0.5C
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/cli/flags.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ flags or options:
3. The Mill build tool process, e.g. `./mill --jobs 10`. These can be passed directly after the
`./mill` executable name, or set in a `.mill-opts` file as shown below in
xref:#_custom_mill_options[Custom mill options]
xref:#_repo_level_mill_options[Repo-Level Mill Options]
4. The JVM running the Mill build tool process, which may take flags. e.g.
`java -Xss10m -Xmx10G`. These are passed via `JAVA_OPTs` or via a `.mill-jvm-opts` flag
Expand Down Expand Up @@ -158,7 +158,7 @@ available as well as the task and module structure of your project, as tasks tha
depend on one another other cannot be processed in parallel


== Custom Mill Options
== Repo-Level Mill Options

Mill supports the `.mill-opts` file for passing a default set of command line
options to Mill itself. For example, if your project's tasks are CPU heavy, you
Expand Down
137 changes: 0 additions & 137 deletions mill.ps1

This file was deleted.

0 comments on commit aea16b7

Please sign in to comment.