This repository showcases and explains how to set up Travis to compile a sbt Scala project using the Triplequote Hydra parallel compiler.
-
Open Source: Contact us at [email protected] to obtain a Hydra Open Source project license.
-
Closed Source: Follow the Hydra getting started to claim your free trial license.
In either case, setting up Hydra takes less than 5 minutes!
The setup assumes your project is already configured to use TravisCI. If not, please read the getting started to setup your project to build with TravisCI.
-
Add project/hydra.sbt to your project.
-
Create a secret $LICENSE environment variable that will hold your Hydra Server license key. Next is the command to execute from inside the project folder (see https://docs.travis-ci.com/user/environment-variables/#encrypting-environment-variables):
$ travis encrypt LICENSE="floating-key=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" --add env.matrix
- Add a build step in the
.travis.yml
so that the hydra.license file is created in the expected place:
script:
- mkdir -p $HOME/.triplequote && echo "$LICENSE" > "$HOME/.triplequote/hydra.license"
Mind that this should be done before any all steps compiling Scala. Look at this repo's .travis.yml for an example.
-
Add the
.hydra
folder to the set of cached directories in your .travis.yml. This is an optimization that should help Hydra delivering optimal performance (read the related documentation for details). -
Commit the changes to your
.travis.yml
.
You are all set to compile Scala with Hydra on Travis!
A Hydra OSS license is granted to developers of non-commercial Open Source projects, with an established and active community. The license is free. However, we ask you to add a reference to Triplequote website on the web pages of your Open Source project (in particular, the README, documentation and product homepages), similar to the Credits section below.
Also, we kindly ask you to help us grow awarness and excitement in the community (e.g., blogging or twitter - @triple_quote is our handle).
Triplequote turns up compilation speed, tools, and support to write Scala code the way you always wanted to. Triplequote is the creator of the Hydra compiler and the Hydra Monitoring tools.