.travis.yml 1.65 KB
Newer Older
1 2
language: c

3
os: osx
4 5

cache:
6
  ccache: true
7

Eric Engestrom's avatar
Eric Engestrom committed
8 9
env:
  global:
10
    - PKG_CONFIG_PATH=""
Jon Turney's avatar
Jon Turney committed
11

12 13 14 15 16 17 18
matrix:
  include:
    - env:
      - BUILD=meson
    - env:
      - BUILD=scons

Jon Turney's avatar
Jon Turney committed
19
before_install:
20 21 22 23 24 25 26 27
  - HOMEBREW_NO_AUTO_UPDATE=1 brew install expat gettext
  - if test "x$BUILD" = xmeson; then
      HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja;
    fi
  - if test "x$BUILD" = xscons; then
      HOMEBREW_NO_AUTO_UPDATE=1 brew install python2 scons;
    fi

28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
  # Set PATH for homebrew pip3 installs
  - PATH="$HOME/Library/Python/3.6/bin:${PATH}"
  # Set PKG_CONFIG_PATH for keg-only expat
  - PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
  # Set PATH for keg-only gettext
  - PATH="/usr/local/opt/gettext/bin:${PATH}"

  # Install xquartz for prereqs ...
  - XQUARTZ_VERSION="2.7.11"
  - wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
  - hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
  - sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
  - hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
  # ... and set paths
  - PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
43 44

install:
45 46 47 48 49 50 51
  - if test "x$BUILD" = xmeson; then
      pip3 install --user meson;
      pip3 install --user mako;
    fi
  - if test "x$BUILD" = xscons; then
      pip2 install --user mako;
    fi
52

53
script:
54 55
  - if test "x$BUILD" = xmeson; then
      meson _build -Dbuild-tests=true;
56 57
      ninja -C _build || travis_terminate 1;
      ninja -C _build test || travis_terminate 1;
58 59
    fi
  - if test "x$BUILD" = xscons; then
60 61
      scons || travis_terminate 1;
      scons check || travis_terminate 1;
62
    fi