Skip to content
Aaron S. Hawley edited this page Sep 30, 2019 · 23 revisions

Should I run it locally?

If you're a library author, yes.

If you're maintaining the community build as a whole, go the Jenkins route first and get familiar with that as it's usually more practical. You can decide later whether to supplement Jenkins with local runs.

How do I run it locally?

You might want to set JAVA_HOME first.

You must use Java 8. (Perhaps Java 9 works, we haven't tried it yet.)

You need to install cloc.

The source and build artifacts that dbuild produces require at least 30GB of disk space.

Several gigabytes of network data are retrieved with git.

Then do:

./run.sh

That's it. It will take hours, so while you wait, make yourself a sandwich. (Even better, make yourself a sandwich-making machine.)

You're also free to specify the nightly Scala you want, e.g.:

version=2.12.1-bin-933bab2 ./run.sh

but you don't have to. If you don't, the last successful nightly will be used.

Building only certain projects

You can build just a subset if you want:

./run.sh scalatest,scalacheck,specs2,utest

This will build only the listed projects and their dependencies. (In the Jenkins GUI, use the projects setting for this.)

Note that dbuild will still extract dependencies for all projects before building any of them. The first time this happens, it can take an hour or longer. After that the results are cached and it will only take about 2 minutes.

It's possible to save on extraction time by removing unneeded projects temporarily from configs/community.dbuild. (We have tried to keep the projects ordered such that it's always safe to remove everything below the project you care about.)

Can I use a locally built Scala?

Yes, version= works with any Scala version dbuild can resolve.

After publishLocal in scala/scala you'll see e.g.

published ivy to /Users/tisue/.ivy2/local/org.scala-lang/scala-compiler/2.12.5-bin-SNAPSHOT/ivys/ivy.xml

So then you can:

version=2.12.5-bin-SNAPSHOT ./run.sh

This works because configs/resolvers.conf includes local.

The build is painfully slow, what helps?

Running Artifactory locally

See Local Artifactory for guidance.

Local caches

Note: Caching is enabled by default when running locally. However, if you're using Jenkins or any other CI as a service to run the community build, be sure to verify these items are cached:

  1. Cache the Community Build git branch (most services take care of this for you by default):
.git/
  1. Scala and dbuild/sbt dependencies (most systems that support Scala also know to do this):
~/.ivy2/cache/
~/.sbt/
~/.m2/
  1. Clones, extractions and build cache of dbuild
~/.dbuild/cache-0.9.16/
clones-0.9.16/
target-0.9.16/extraction/
Clone this wiki locally