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.
debian-packaging
nirenjan 2020-04-12 22:04:43 -07:00
parent dc80a0f2f1
commit a5b69124a4
1 changed files with 34 additions and 4 deletions

View File

@ -1,20 +1,50 @@
language: c language: c
script: ./.travis_build.sh script: ./.travis_build.sh
# Compile on both MacOS and Linux
os:
- osx
- linux
# Compile using both gcc & clang # Compile using both gcc & clang
compiler: compiler:
- gcc - gcc
- clang - clang
# Use container based infrastructure jobs:
sudo: false include:
- os: linux
dist: trusty 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: addons:
apt: apt:
packages: packages:
- libusb-1.0-0-dev - libusb-1.0-0-dev
- libudev-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 # Enable parallel make
env: env: