Skip to content

Commit 7c85cb3

Browse files
committed
add instructions for Setting up Mill in CI and mention FORCE_COLOR
1 parent 330fe8a commit 7c85cb3

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed
327 KB
Loading
349 KB
Loading

website/docs/modules/ROOT/pages/cli/installation-ide.adoc

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,37 @@ going on. It contains regular Mill output accompanied by additional BSP
389389
client-server communication details. This can be useful to look at if your
390390
IDE fails to import your Mill project
391391

392+
393+
== Setting up Mill in CI
394+
395+
Due to Mill's usage of xref:#_bootstrap_scripts[Bootstrap Scripts], you typically do not
396+
need to setup anything in your CI system to make Mill work. Any Mill project should be
397+
buildable via `./mill` on your CI machines without needing to first install Java, Mill,
398+
or other dependencies, and the `./mill` bootstrap script will download these dependencies
399+
as necessary.
400+
401+
One thing that you should set up manually is to enable a https://force-color.org/[FORCE_COLOR]
402+
environment variable in your CI system. For example, in Github Actions this can be configured
403+
in your workflow `.yml` file via:
404+
405+
```yaml
406+
env:
407+
FORCE_COLOR: '1'
408+
```
409+
410+
`FORCE_COLOR` ensures Mill produces ANSI-colored output logs despite being called
411+
programmatically in on your CI machines. Most CI systems process and render ANSI
412+
colors nicely in the browser, and this can make your CI logs much easier to read
413+
than if they were black-and-white:
414+
415+
**Without FORCE_COLOR**
416+
417+
image::basic/ForceColor0.png[]
418+
419+
**With FORCE_COLOR=1**
420+
421+
image::basic/ForceColor1.png[]
422+
392423
== Using Mill without access to Maven Central
393424

394425
Under some circumstances (e.g. corporate firewalls), you may not have access maven central.

0 commit comments

Comments
 (0)