Travis CI examples

Travis CI Continuous Integration service (self-check code on each git push) has free private builds for educational users, and free public builds for all.

Free continuous integration

These CI services are free for public repositories. Some have usage limits (e.g. minutes/month). Even for unlimited services like Travis CI, I cancel build jobs if I make git push in quick succession to save their resources from unneeded builds I know have errors. A git commit including [ci skip] will not CI build, that seems to be a de facto standard.

CI Service OS
Travis Mac, Linux
Gitlab Mac, Linux, Windows
Appveyor Windows
Codeship Docker (advanced)

Travis-CI Examples

Travis-CI can compile in almost any language, across operation system versions and compiler versions.

Here are a few categories of simple multi-platform builds.

Python + Fortran

Python compiling 40 year old Fortran code

C + HDF5 + Cmake

IPv6 C with HDF5 writing and Cmake

C++ + Cmake

C++ and Cmake

Pascal

Who ever thought Pascal was obsolete?

Quick Start Travis-CI

  1. Create a free travis-ci.org account–perhaps using your Github credentials
  2. add a repository to Travis-CI
  3. copy a .travis.yml template from one of the examples above–for Python, a tests/test.py file is expected. Make some very simple test, perhaps look at one of the examples for ideas.

Travis-CI output

The key point is that Travis CI considers only stderr == / != 0 for pass/fail:

stderr outcome
== 0 PASS
!= 0 FAIL

A third case is an ERROR in setup, perhaps a misconfigured setup.py in your project or missing prereq.

Leave a Comment