Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use travis brew addon #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
os:
- linux
- osx

language: cpp

Expand All @@ -11,15 +12,24 @@ services:
- docker

before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ninja; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip3 install meson; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull sdilts/fedora-meson; fi

addons:
homebrew:
- packages:
- meson
- ninja
- python3
update: true

matrix:
- exclude:
- os: osx
compiler: gcc

script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM sdilts/fedora-meson > 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 && TRAVIS=true CC=$CC CXX=$CXX meson builddir && ninja -C builddir test"; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then SDKROOT=$(xcodebuild -version -sdk macosx Path) meson builddir && ninja -C builddir test; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then meson builddir && ninja -C builddir test; fi