blob: 6528b104667353acf3f90aa7f3963e6f3cbaae16 [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
Eric Engestromb0853a42019-10-18 15:03:43 +010022 HOMEBREW_NO_AUTO_UPDATE=1 brew install ninja;
Eric Engestrom64ffc282019-07-30 16:18:10 +010023 fi
24 - if test "x$BUILD" = xscons; then
Eric Engestromb0853a42019-10-18 15:03:43 +010025 HOMEBREW_NO_AUTO_UPDATE=1 brew install scons;
Eric Engestrom64ffc282019-07-30 16:18:10 +010026 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 Engestrom3ad61542019-10-18 15:05:21 +010058 ninja -C _build install || travis_terminate 1;
Eric Engestrom64ffc282019-07-30 16:18:10 +010059 fi
60 - if test "x$BUILD" = xscons; then
Eric Engestrom690d3592019-10-29 09:24:36 +000061 scons force_scons=1 || travis_terminate 1;
62 scons force_scons=1 check || travis_terminate 1;
Eric Engestrom64ffc282019-07-30 16:18:10 +010063 fi