From a5b69124a4030f928869986c7cdc04d6d8bdbcd6 Mon Sep 17 00:00:00 2001 From: nirenjan Date: Sun, 12 Apr 2020 22:04:43 -0700 Subject: [PATCH] Update build matrix to include OSX, Xenial and Bionic This commit adds OSX to the build matrix, as well as building on Trusty, Xenial and Bionic, both with GCC and CLang on all distributions. For now, the OSX build uses the default image provided by Travis CI, but we may decide to add more images in the future. Also move realpath installation out of addons::apt::packages, since on Xenial and newer distributions, realpath is included in the coreutils package and doesn't need to be explicitly installed. However, we still need it on Trusty, so add a line to manually install it. --- .travis.yml | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 93ae10b..cc8f78e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,50 @@ language: c script: ./.travis_build.sh +# Compile on both MacOS and Linux +os: + - osx + - linux + # Compile using both gcc & clang compiler: - gcc - clang -# Use container based infrastructure -sudo: false -dist: trusty +jobs: + include: + - os: linux + dist: trusty + compiler: gcc + - os: linux + dist: trusty + compiler: clang + - os: linux + dist: xenial + compiler: gcc + - os: linux + dist: xenial + compiler: clang + - os: linux + dist: bionic + compiler: gcc + - os: linux + dist: bionic + compiler: clang + +# Install dependencies addons: apt: packages: - libusb-1.0-0-dev - libudev-dev - - realpath + homebrew: + packages: + - libusb + +# Ensure realpath is available on Trusty +before_script: + - if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get install realpath || true; fi # Enable parallel make env: