Announcing Haskell project support

Michael Klishin,

Travis’ Eleven

Today we are happy to announce support for an 11th language on Travis CI: Haskell. Known for its concision and very advanced type system, Haskell has been attracting some of the brightest minds in the programming languages research community for a couple of decades.

Haskell can be found in code analysis tools, DSLs for cryptographic algorithms, secure networking stack implementations, network applications, plenty of financial software and even system administration. So Haskell sounds like the right candidate to complete Travis’ Eleven.

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 7,000 open source projects, including Ruby, Ruby on Rails, RubyGems, Node.js, Leiningen, Symfony and many more.

Getting Your Project on Travis CI

Travis CI currently provides Haskell Platform 2011.04 (with GHC 7, Cabal, Happy, Alex and so on). 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 Cabal, a minimal .travis.yml would look like this:

language: haskell

Travis CI will run the dependency installation command:

cabal install 

and then the testing commands:

cabal configure --enable-tests && cabal build && cabal test

It is possible to override these commands and add new ones to the build lifecycle, please refer to our documentation, which now includes a guide dedicated to Haskell.

Build workflow

By default Travis’ build workflow 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 use cabal install by default. 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. cabal build && cabal test. This too can be overridden in .travis.yml.
  • Report the build has finished running.

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 Alessandro Vermeulen for his help with making Haskell support on Travis CI a reality.


The Great Bundler 1.1 Upgrade

Michael Klishin,

The Great Bundler 1.1 Upgrade

As you possibly have heard, Bundler 1.1 was released a few days ago and is no longer vaporware, huzzah! We want to explain briefly how Travis CI will migrate to it, and how you can upgrade early if you want to.

Key Improvements in Bundler 1.1

Bundler 1.0 is often criticized for being a tad slow. One of the reasons was due to the large number of requests Bundler 1.0 issues to rubygems.org to resolve the dependency graph. Bundler 1.1 uses a new and improved rubygems.org API to significantly reduce the number of network requests, and in some cases it can even avoid hitting the network altogether.

Where We Are Today

Travis CI Ruby VMs have Bundler 1.0 preinstalled. If you have a small Gemfile then this should be perfectly fine for you, but if you have a larger more complicated Gemfile then your build might benefit from Bundler 1.1.

To update Bundler before dependencies are installed you can do:

before_install:
  - gem install bundler

And thanks to virtual machine snapshotting these changes won’t affect subsequent builds.

Migrating to 1.1

On March 14th, 2012 we plan to update the Ruby VMs to use Bundler 1.1. If you experience any issues with Bundler 1.1 please report these to the Bundler team.

If for some reason you want to continue using a previous Bundler version you can downgrade using the following technique:

before_install:
  - rvm @default,@global do gem uninstall bundler -v 1.1.0 -x
  - gem install bundle --version '~> 1.0.0'
  - bundle --version

Happy Friday!

The Travis CI Team


Announcing Python and Perl support on Travis CI

,

Just shy of a week ago we announced support for Java, Scala, and Groovy. Well, we thought to ourselves ‘we already support 8 languages, why not more?’, and MOAR you shall have!

Today we are happy to announce first class support for Python and Perl projects!

Adding support for Perl and Python was a no brainer for us, not that it was easy, because it wasn’t, but that both languages were sought after by their respective communities and completes the quest for the three P’s (PHP, Perl, and Python).

Perl, which has been around since 1987 (Genesis “Land Of Confusion”) and has a toolset just as strong and mature as its community. For example, the Perl community has had a variation of Travis for the last 10 years called CPANTesters, with the difference being that CPANTesters tests releases while we test active development.

Python, around since the early 90’s (think MC Hammer “Too Legit to Quit”, 1991), and in fact it’s OLDER than Java! It is used for pretty much EVERYTHING you can think of, from research at CERN, building websites (YouTube and DISQUS), scripting for Games (Battlefield 2), and scripting for Graphics programs (Autodesk Maya, GIMP, Panda3D and Blender to name a few). You may have used Python and didn’t even know it!

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 Python Project on Travis CI

Travis CI provides multiple Python and Perl versions to test against. To get started, you need to add one file (.travis.yml) and the GitHub hook as described in the Getting Started guide. A minimal .travis.yml would look like this:

language: python
python:
  - "2.6"
  - "2.7"
  - "3.2"
# command to install dependencies
install: pip install -r requirements.txt --use-mirrors
# command to run tests
script: nosetests

It is possible to add new commands to the build lifecycle, please refer to our documentation, which now includes a guide dedicated to Python.

Getting Your Perl Project on Travis CI

Travis CI provides three Perl versions to test against. To get started, you need to add one file (.travis.yml) and the GitHub hook as described in the Getting Started guide. A minimal .travis.yml would look like this:

language: perl
perl:
  - "5.14"
  - "5.12"

Travis CI will will run widely used

cpanm --installdeps --notest .

command to install your project’s dependencies. For running tests, Travis CI will try to detect Build.PL or Makefile.PL file in your repository root and will run either

perl Build.PL && ./Build test

or

perl Makefile.PL && make test

It is possible to override these commands and add new ones to the build lifecycle, please refer to our documentation, which now includes a guide dedicated to Perl.

Build workflow

Travis’ build workflow usually is

  • Clone your repository from GitHub
  • Pick language/runtime version to use
  • Run before_install commands (can be more than one)
  • Install dependencies. This will use cpanm for Perl and pip for Python. 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. perl Makefile.PL && make test. This too can be overriden in .travis.yml. Python projects are required to provide script: command.
  • Report the build has finished running.

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 Donald Stufft, Kenneth Reitz, Jannis Leidel and David Reid for helping us making Python support happen and initial field testing.

Perl support wouldn’t be possible without amazing work and advice by Magnus Holm, Jonathan “Duke” Leto (also a big YAY for adding Parrot to Travis CI!), and Xavier Noria.

Also, if you have a spare minute, send a HUGE thanks to Michael Klishin who works day and night (seriously, we can not figure out when he sleeps, or if he sleeps!) maintaining the VMs and making sure they are up to date. He was the driving force behind adding support for JVM languages (first Clojure, later Java, Scala, Groovy), and was instrumental in adding Python and Perl support. So please send him a tweet to say thanks, because without Michael we would still be at just Ruby support!

Next steps

Python and Perl support brings the total number of languages supported by Travis CI to 10. We love adding support to even more languages, but we think for now we need to focus on features like pre-tested pull requests that will benefit all projects, regardless of the language.

If you want to help us make Travis CI even better, consider making a donation.