travis: Also build on OSX

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Jon Turney 2017-09-22 15:25:05 +01:00 • committed by Eric Anholt
commit 0b00440678
2 changed files with 43 additions and 2 deletions

View file

@ -1,11 +1,19 @@
language: c
cache: ccache
dist: trusty
services: docker
matrix:
include:
- os: linux
dist: trusty
services: docker
- os: osx
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull anholt/xserver-travis ; fi
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ccache ; fi
before_script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM anholt/xserver-travis:v6 > Dockerfile ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile ; fi
@ -13,3 +21,5 @@ before_script:
script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run --volume $HOME/.ccache:/root/.ccache withgit /bin/sh -c "cd /root && ./test/scripts/build-travis-deps.sh" ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./test/scripts/build-travis-osx.sh ; fi
- ccache -s