Using Travis CI with Vala
Travis CI seems to be catching on pretty well these days. I’ve seen quite a few projects using it on Github, so I wanted to see what all the fuss was about.
If you look at their page you’ll notice Vala is not one of the supported languages. Not to fear though since Vala is merely the middle man and actually ends up being pure C. The only real tricky part then is figuring out how to setup your .travis.yml file so that Travis can compile your Vala -> C.
After a little Googling, here is what I came up with:
language: c compiler: gcc before_install: - sudo add-apt-repository ppa:vala-team/ppa -y - sudo apt-get update -qq - sudo apt-get install -qq gnome-common libglib2.0-dev libgtk-3-dev libsqlite3-dev libvala-0.22-dev valac-0.22 gobject-introspection script: - cmake . - make
The Travis CI servers are just virtual Ubuntu instances so you can use sudo apt-get to install anything you need including new PPAs and any other packages necessary… including Vala!
One thing of note though, it would appear that the servers by default have a lot of things preinstalled for you. Notice I didn’t have to install Cmake and I’m pretty sure I don’t have to install the Sqlite headers either.