Travis CI

This week I set up continuous integration (CI) with travis for our project. I knew very little about travis — or CI — before, and had thought of it more in terms of running automatic tests. And we don’t even have unit tests yet.

But it turns out travis also very useful for another reason: to automatically build the package — including compiling of Java classes, wrappers and all — and deploy it to PyPI. With the build script from Brainhack Vancouver and, as usual, lots of peeking into other packages, it was easier than I had thought to put together the travis.yml script.

We currently deploy to TestPyPI every time changes are pushed to master. But once Nighres is ready for the official release, it’s easy to switch to the real PyPI server and deploy only tagged releases.

And when we have proper tests for the Python code, we can extend the travis script to run the tests against different versions of Python and the dependencies (Numpy and Nibabel), to ensure that changes to the existing code don’t break current functionality.

With the current script, travis builds on Linux Ubuntu Trusty x86_64. It will be important to set up similar builds for other architectures and platforms, so that we can make the precompiled package available for more users. But one step after the other.

For now, at the end of the second last week of GSoC, what could be more satisfying:

Build Status