Announcing Java, Scala and Groovy project support on travis-ci.org

,

Travis CI started in early 2011 as a service for the Ruby community with the simple vision to make CI easy for OSS libraries and services. It wasn’t long until we added support for Erlang, Clojure, Node.js and PHP. And, in fact, it is easy to build many other projects by supplying your own commands.

Today we are excited to announce support for Java, Scala, and Groovy!

The JVM ecosystem is very vibrant with multiple exciting languages maturing and being adopted by companies far and wide. In fact, since November 2011 Travis started using the JVM (JRuby) for several of our applications. The JVM and JRuby gave us access to a very solid runtime, as well as a vast selection of stable libraries, helping us to keep up with the growth over the last year.

Wait, What Is Travis CI Anyway?

Travis CI is a distributed continuous integration for the open source community. It is integrated with GitHub and offers first class support for multiple technologies. Our CI environment provides many tools, libraries, and services (MySQL, PostgreSQL, Redis, RabbitMQ, MongoDB and so on), and you don’t have to bother setting up your own CI server.

You can watch build logs in near-real time in your browser, access logs later, and even link to log line numbers (for example, when reporting an issue).

Thanks to GitHub integration, Travis CI lets your contributors effortlessly add their development forks to test work-in-progress branches and makes your CI status very visible to the community thanks to our CI badges.

Started in early 2011, Travis CI has since run half a million builds for over 6,000 open source projects, including Ruby, Ruby on Rails, RubyGems, Node.js, Leiningen, Symfony and many more.

Getting Your Project on travis-ci.org

Travis CI currently provides OpenJDK 6, Maven 3, SBT 0.11.x and Gradle (currently 1.0 Milestone 8). To get started, you need to add one file (.travis.yml) and the GitHub hook as described in the Getting Started guide. If your project uses Maven or Gradle, a minimal .travis.yml would look like this:

language: java

for Java, or

language: groovy

for Groovy and so on. Then Travis will see if you have a build.gradle or pom.xml file in your repository root and will run the standard dependency installation and testing commands, like

mvn test

or

gradle check

It is possible to override these commands and add new ones to the build lifecycle, please refer to our documentation, which now includes guides dedicated to Java, Scala and Groovy.

Build workflow

Travis’ build workflow usually is

  • Clone your repository from GitHub
  • (If applicable) pick language/runtime version to use
  • Run before_install commands (can be more than one)
  • Install dependencies. Travis will try to detect whether project uses Gradle and SBT and run their respective commands, falling back to mvn install. You can override the command using the install key in your .travis.yml.
  • Run one or more before_script commands.
  • Run the script command, e.g. gradle check or mvn test, falling back to ant test. This too can be overriden in .travis.yml.
  • Report the build has finished running.

Support for multiple JDKs in the Travis CI Environment

travis-ci.org currently provides only one JDK. This is not on par with our support for Ruby (a dozen of versions/implementations), Erlang (several OTP releases) and so on. We will add support for testing against multiple JDKs near in the future.

Note that Clojure and Scala build tools allow testing against multiple versions and it is just as valid for Travis CI. This is documented in our guides:

Learn more

To learn what tools and services (MySQL, Postgres, Riak, etc.) are available in the CI environment, refer to the CI environment guide.

If you need help, feel free to join #travis on chat.freenode.net, ping us on Twitter (@travisci) and ask questions on our mailing list.

Thank You Contributors

We would like to thank Gilles Cornu for doing most of the work on the Scala builder and updating our SBT Chef cookbook to 0.11.x.

Next steps

We don’t want to stop here! There are so many other fantastic languages to add, and if all goes well we should have Perl and Python support around the corner. And if you want to help out, donating to Travis CI will make it happen sooner.

Discuss on Hacker News

You can discuss Java, Scala and Groovy support on travis-ci.org on Hacker News


Announcing "first class" PHP project support!

,

Today we are happy to announce first class PHP support with Travis CI.

It includes all the same features Ruby, Erlang and Node.js projects enjoy today, including:

  • Easy to get started and integrates with GitHub.
  • Test against multiple databases and services, including MySQL, Postgres, Redis, RabbitMQ and many more.
  • Test your projects against multiple PHP versions.
  • Build results are publicly available online so you can link to them in your bug reports, including line numbers.
  • Notifications the way you want them! (email, IRC, and webhooks)

Over the last several weeks many nice folks from the PHP community have been working with the Travis team and it would not be possible without all the help from Loïc Frering and Pascal Borreli. Till Klampaeckel has helped us set up phpfarm and pyrus and test drive the whole thing. Álvaro Videla and Lukas Kahwe Smith also helped us a lot by running some of the Friends of Symfony projects on Travis early on. Pascal also got Symfony, Twig, Silex, Doctrine and Monolog test suites up and running on travis-ci.org (we hope his patches will be accepted upstream).

Having all those projects building fine for several days makes us confident that we are ready to ship this feature.

Please see our initial documentation for PHP projects and the rest of the guides. We tried to link to as many real world .travis.yml examples to demonstrate all the features in action.

In addition, we have a couple of machines lined up that we will be running PHP builds on. One of them is Shopify: they donated a worker we have been using for Node.js projects. Another one is ServerGrove, experts in PHP hosting and specifically frameworks like Symfony and Zend Framework: they donated us one more machine to run PHP builds on.

If you have questions, find us in #travis on chat.freenode.net, we will be happy to answer them. To stay up to date with new announcements, CI environment software updates and more, follow us on Twitter and join our mailing list.

We hope you enjoy using Travis for your open source projects as much as we do. Go add your PHP projects to Travis CI and recommend your fellow PHP developers to do the same!

The Travis Team.

Spread the word!

Feel free to discuss and upvote on Hacker News

Updates


VM environment upgrade, Nov 11th, 2011

,

travis-ci.org Ruby workers were upgraded, here is what’s new:

Ruby Workers Changes

Rubinius team was busy making GC and full CPU concurrency improvements as well as upgrading Ruby standard library for their 1.9 mode. Give it a try by testing your Ruby projects against Rubinius!

Node.js Workers Changes

Node.js workers were upgraded, too:

Follow Us on Twitter

To get regular updates about travis-ci.org environment upgrades and other developments, follow Travis CI on Twitter and watch our Chef cookbooks repository on GitHub.

MK on behalf of the Travis CI Team.