Travis CI MacOS builds with Fortran

Travis-CI MacOS builds (denoted osx in .travis.yml) emerged from beta in April 2013 using cloud-based Mac hardware. In January-March 2018, additional Travis-CI resources were progressively brought online, completed in March 2018. The speed for Travis-CI MacOS builds is quite fast, almost as fast to start as Linux.

Travis-CI MacOS queue

Template

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

language: minimal
group: travis_latest

git:
  depth: 25
  quiet: true

env: FC=gfortran

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

matrix:
  include:
  - os: linux
  - os: osx
    before_install:
    - brew upgrade gcc > /dev/null
    - brew install lapack open-mpi > /dev/null


install:
- cmake -B build
- cmake --build build

script:
- ctest --test-dir build --output-on-failure

Keep the brew update step as sometimes Travis-CI will break on brew install without first doing brew update if the Travis-CI MacOS image hasn’t been updated in a while.

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 MacOS 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.