From bda06cee127dfcfe76063d6e753885335e53f8e2 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 30 May 2016 22:08:25 +0300 Subject: Added OSX support for Travis. --- .travis.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8b13401..27e3b2b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,26 @@ sudo: required -language: c +os: + - linux + - osx + +language: + - cpp services: - docker before_install: - - docker pull jpakkane/mesonci:xenial + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ninja python3; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull jpakkane/mesonci:xenial; fi -# We need to copy the current checkout inside the container, +# We need to copy the current checkout inside the Docker container, # because it has the MR id to be tested checked out. script: - - echo FROM jpakkane/mesonci:xenial > Dockerfile - - echo ADD . /root >> Dockerfile - - docker build -t withgit . - - docker run withgit /bin/sh -c "cd /root && ./run_tests.py" + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM jpakkane/mesonci:xenial > Dockerfile; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit .; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && ./run_tests.py"; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./run_tests.py ; fi -- cgit v1.1