blob: 97720cf118ac24fa819504878f71952f63e7fd9f [file] [log] [blame]
Eric Anholt1c0ac192015-11-23 16:25:29 -08001language: c
2
Eric Engestrom6e5728e2019-05-09 13:28:41 +01003os: osx
Eric Anholt1c0ac192015-11-23 16:25:29 -08004
5cache:
Emil Velikov6431b982017-04-06 14:02:38 +01006 ccache: true
Eric Anholt1c0ac192015-11-23 16:25:29 -08007
Eric Engestrom6e0effb2019-02-07 11:36:19 +00008env:
9 global:
Eric Engestrom6e5728e2019-05-09 13:28:41 +010010 - PKG_CONFIG_PATH=""
Jon Turneyb3a1d952018-01-18 13:05:06 +000011
Eric Engestrom64ffc282019-07-30 16:18:10 +010012matrix:
13 include:
14 - env:
15 - BUILD=meson
16 - env:
17 - BUILD=scons
18
Jon Turneyb3a1d952018-01-18 13:05:06 +000019before_install:
Eric Engestrom64ffc282019-07-30 16:18:10 +010020 - HOMEBREW_NO_AUTO_UPDATE=1 brew install expat gettext
21 - if test "x$BUILD" = xmeson; then
22 HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja;
23 fi
24 - if test "x$BUILD" = xscons; then
25 HOMEBREW_NO_AUTO_UPDATE=1 brew install python2 scons;
26 fi
27
Eric Engestrom6e5728e2019-05-09 13:28:41 +010028 # Set PATH for homebrew pip3 installs
29 - PATH="$HOME/Library/Python/3.6/bin:${PATH}"
30 # Set PKG_CONFIG_PATH for keg-only expat
31 - PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
32 # Set PATH for keg-only gettext
33 - PATH="/usr/local/opt/gettext/bin:${PATH}"
Jon Turneyb3a1d952018-01-18 13:05:06 +000034
Eric Engestrom6e5728e2019-05-09 13:28:41 +010035 # Install xquartz for prereqs ...
36 - XQUARTZ_VERSION="2.7.11"
37 - wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
38 - hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
39 - sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
40 - hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
41 # ... and set paths
42 - PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
Eric Anholt1c0ac192015-11-23 16:25:29 -080043
44install:
Eric Engestrom64ffc282019-07-30 16:18:10 +010045 - if test "x$BUILD" = xmeson; then
46 pip3 install --user meson;
47 pip3 install --user mako;
48 fi
49 - if test "x$BUILD" = xscons; then
50 pip2 install --user mako;
51 fi
Eric Engestromb3aa3702019-03-08 11:16:25 +000052
Eric Anholt1c0ac192015-11-23 16:25:29 -080053script:
Eric Engestrom64ffc282019-07-30 16:18:10 +010054 - if test "x$BUILD" = xmeson; then
55 meson _build -Dbuild-tests=true;
Vinson Lee029b07b2019-08-29 23:15:29 -070056 ninja -C _build || travis_terminate 1;
57 ninja -C _build test || travis_terminate 1;
Eric Engestrom64ffc282019-07-30 16:18:10 +010058 fi
59 - if test "x$BUILD" = xscons; then
Vinson Lee029b07b2019-08-29 23:15:29 -070060 scons || travis_terminate 1;
61 scons check || travis_terminate 1;
Eric Engestrom64ffc282019-07-30 16:18:10 +010062 fi