Skip to content

Commit

Permalink
Have Travis test Meson builds as well
Browse files Browse the repository at this point in the history
This is a relatively easy way to have working Meson builds without the
need for sudo or Docker in Travis.
  • Loading branch information
ximion committed Mar 1, 2017
1 parent 8636fb4 commit 3ae0b27
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
language: d
dist: trusty
sudo: false

os:
- linux
Expand All @@ -8,4 +10,23 @@ d:
- dmd
- ldc

sudo: false

before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ninja python3; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip3 install meson; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pip3 install meson; fi

install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mkdir .ntmp && curl -L https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip -o .ntmp/ninja-linux.zip; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then unzip .ntmp/ninja-linux.zip -d .ntmp; fi

before_script:
- export PATH=$PATH:$PWD/.ntmp

script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then meson build && ninja -C build; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ninja -C build test -v; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then SDKROOT=$(xcodebuild -version -sdk macosx Path) meson build && ninja -C build test; fi
- dub build
- dub test

0 comments on commit 3ae0b27

Please sign in to comment.