Scala
Scala CI on GitHub Actions
sbt spends longer starting up and resolving than compiling.
90s → 8s
sbt startup
11m → 3m
Compile
sbt spends longer starting up and resolving than compiling.
Why it happens
sbt boots a JVM, resolves Coursier dependencies and loads the build definition before a single file compiles.
What to change
- Cache ~/.cache/coursier, ~/.sbt and the target/ directories
- Use sbt --client or run all tasks in a single sbt invocation
- Enable the Zinc incremental compiler cache across runs
- Give the JVM 8 GB or more — Scala compilation is memory-hungry
Scala on runnerhut
yaml
jobs: test: runs-on: runnerhut-8vcpu-ubuntu-2404 steps: - uses: actions/checkout@v4 - uses: coursier/cache-action@v6 - run: sbt "compile; test"The only runnerhut-specific line is `runs-on: runnerhut-8vcpu-ubuntu-2404`. Everything else is standard GitHub Actions — the same actions, the same secrets and the same permissions model you use today.
Your next build could be twice as fast, at half the price
Start free. Migrating away is the same one line, and we publish that diff too.