New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis CI now makes builds, Linux/OS X Python 2.7/3.4 #421

merged 15 commits into from Sep 2, 2014


None yet
2 participants

jabooth commented Aug 31, 2014

This PR substantially improves our travis configuration so that every new commit onto menpo/master will yield an installable binary build of menpo for linux/osx python 2/3.

I've made a Python script called traviconda which does most of the heavy lifting of integrating Travis and conda. It is hosted separately, and so can be updated independently of the projects that rely on it (now menpo, cyassimp, cyrasterize, hdf5able). Each of our subprojects is already now working with traviconda - this PR just let's Menpo join in.


Traviconda works by:

  1. Setting up either a Python 2.7 or Python 3.4 miniconda environment suitable for conda-build on the travis instance
  2. Building the project using the locally hosted conda files at './conda'
  3. Uploading the build to binstar, if and only if the build passes.

For menpo we have now moved the running of our unit tests into the test stage of the conda build. This means that builds are only made if all tests pass. Any failure of a test will mean the build fails (so nothing changes in terms of waiting for the tick of travis to let you know if a PR passes tests or not).

Builds are made for every branch of a traviconda project, so in the case of menpo that's just master (and the few other ones we have on here from time to time). Builds that are not 'releases' (i.e., any branch head which is not tagged with a version number) are placed on a channel at our binstar account with a name equal to the branch name. What this means is, to install the current master version of menpo, you can simply ask travis for the 'master' channel version:

conda install -c menpo/channel/master menpo

Or if you want to develop on the latest version of cyassimp:

conda install -c menpo/channel/master cyassimp

This is very useful for getting students set up with the latest version of menpo without having to go through the full setup of everything (if they just need the latest build but are going to do all their work in notebooks for example).

Git tagged releases are the same, but they are pushed out to the 'main' default channel. That means things work as is currently stated in the installation guide:

conda install -c menpo menpo

but the build itself is fully automated.

This has taken a while to set up, but it really simplifies things in the long run. For one thing it's easy to setup new traviconda builds, so if we do break menpo up a little more it won't be adding to the burden of worrying about releases or generating code that others can use - it should all just work.

Things to do

This PR is good to come in now, but we can take this a little further as we go to make things better:

  1. Re-add coveralls support Currently this setup means we loose coveralls. It's completely possible to get it set back up, but I am a little sick of testing travis stuff so I say we come back to it later.
  2. Normalize tests so we start getting OS X builds Currently OS X Python 2.7 builds fail due to the numerical differences in tests. We can probably resolve that with anaconda accelerate. Soon as the tests pass, we will start getting OS X Python 2.7 builds
  3. Menpo Python 3 support This gives up a full test setup for Python 3. In fact, every build from here on out is attempted on Python 3 (OS X and Linux) but they are all failing due to Python 3 support not being complete. Now we can incrementally add Python 3 support (tracked in #419) and as soon as the tests pass, we will have Python 3 builds of menpo on OS X and Linux.
  4. Windows support. @patricksnape has been working on getting appveyor setup for us, which is basically a windows equivalent to travis. It shouldn't be too hard to adapt traviconda to work with app veyor. At that stage we will be automatically generating builds for Python 2/3 OS X/Linux/Windows for all our code which will be amazing! :)

jabooth added some commits Aug 31, 2014

@jabooth jabooth added the in progress label Aug 31, 2014

@patricksnape patricksnape force-pushed the traviconda branch 3 times, most recently from 1c1bd76 to e8aaea1 Aug 31, 2014

patricksnape and others added some commits Aug 31, 2014

Use Jinja variable for version
Set the menpo version using an environment variable using
bash commands

@jabooth jabooth referenced this pull request Sep 1, 2014


add OS X travis build (WIP) #417

0 of 2 tasks complete

This comment has been minimized.


jabooth commented Sep 1, 2014

I think we can get this in as-is @patricksnape, can always build on it in future. Agreed?

@patricksnape patricksnape force-pushed the traviconda branch 2 times, most recently from 269def9 to b3b3018 Sep 1, 2014

Delete precise tests
The precision tests are causing Travis to fail, and are not good
unit tests anyways. We should being running the benchmark to
check the performance!

@patricksnape patricksnape force-pushed the traviconda branch from 463d7dd to f66a2a6 Sep 1, 2014

patricksnape added some commits Sep 1, 2014

@patricksnape patricksnape force-pushed the traviconda branch from 953ee80 to 1c22a42 Sep 1, 2014

patricksnape and others added some commits Sep 1, 2014

Merge remote-tracking branch 'upstream/master' into traviconda

This comment has been minimized.


jabooth commented Sep 1, 2014

due to an update to traviconda, freshly completed builds now purge old builds from binstar automatically.


This comment has been minimized.


jabooth commented Sep 2, 2014

bringing this in as it gives us testing on OS X and automated builds for 2/3 platforms. Getting appveyor working is a high priority.

jabooth added a commit that referenced this pull request Sep 2, 2014

Merge pull request #421 from menpo/traviconda
Travis CI now makes builds, Linux/OS X Python 2.7/3.4

@jabooth jabooth merged commit 9811667 into master Sep 2, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed

@jabooth jabooth deleted the traviconda branch Sep 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment