Travis CI OSX MacOS builds with Fortran

1 minute read

Travis-CI MacOS builds (denoted osx in .travis.yml) emerged from beta in April 2013 using cloud-based Mac hardware. As this service became popular beyond iOS developers using it for Objective C builds, the amount of free service offered for MacOS builds became increasingly constrained. In January-March 2018, additional Travis-CI resources were progressively brought online, completed in March 2018. The speed for Travis-CI OSX builds from March 2018 onwards is quite fast, almost as fast to start as Linux.

Template

My typical .travis.yml for MacOSX (including Linux) for a Fortran build that happens to use Lapack and MPI looks like:

language: c
group: travis_latest

git:
  depth: 3
  quiet: true

addons:
  apt:
    packages: ['gfortran','liblapack-dev','libopenmpi-dev']


matrix:
  include:
  - os: linux
  - os: osx
    before_install:
    - brew update > /dev/null
    - brew install gcc || brew link --overwrite gcc
    - brew install lapack open-mpi > /dev/null
    - export FC=gfortran


install:
- cd $TRAVIS_BUILD_DIR/bin
- cmake ..
- cmake --build .

script: ctest --output-on-failure

Constraints

Free Travis-CI.org users are concurrency constrained to two MacOS instances and five Linux instances. MacOS builds count against the total concurrency limit of five for free Travis-CI.org users.

Travis-CI.org osx build backlog graph in red.
Travis-CI.org osx build backlog graph for 2017.

Metrics

The Travis-CI status panel shows that the MacOS backlog since March 2018 is typically near zero like the Linux builds. Before 2018, the OSX build backlog could be in the hundreds or thousands of jobs–this is no longer an issue. The Linux backlog typically stays at or near zero.

Paid Travis-CI.com customers should also experience short wait times of a minute or so for osx builds.

Leave a comment