Skip to content
Seth Tisue edited this page Mar 28, 2019 · 23 revisions

Local runs

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, would running Artifactory locally help?

Yes. See Local Artifactory for guidance.

Clone this wiki locally