blob: ab8e67e74bdbbd4ab0c740ec6851a69ea068fb9d [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
Eric Engestrombc943d02019-12-21 19:28:07 +000029 - PYTHON_VERSION=$(python3 -V | awk '{print $2}' | cut -d. -f1-2)
30 - PATH="$HOME/Library/Python/$PYTHON_VERSION/bin:${PATH}"
Eric Engestrom6e5728e2019-05-09 13:28:41 +010031 # Set PKG_CONFIG_PATH for keg-only expat
32 - PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
33 # Set PATH for keg-only gettext
34 - PATH="/usr/local/opt/gettext/bin:${PATH}"
Jon Turneyb3a1d952018-01-18 13:05:06 +000035
Eric Engestrom6e5728e2019-05-09 13:28:41 +010036 # Install xquartz for prereqs ...
37 - XQUARTZ_VERSION="2.7.11"
38 - wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
39 - hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
40 - sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
41 - hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
42 # ... and set paths
43 - PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
Eric Anholt1c0ac192015-11-23 16:25:29 -080044
45install:
Eric Engestrom64ffc282019-07-30 16:18:10 +010046 - if test "x$BUILD" = xmeson; then
47 pip3 install --user meson;
48 pip3 install --user mako;
49 fi
50 - if test "x$BUILD" = xscons; then
51 pip2 install --user mako;
52 fi
Eric Engestromb3aa3702019-03-08 11:16:25 +000053
Eric Anholt1c0ac192015-11-23 16:25:29 -080054script:
Eric Engestrom64ffc282019-07-30 16:18:10 +010055 - if test "x$BUILD" = xmeson; then
56 meson _build -Dbuild-tests=true;
Vinson Lee029b07b2019-08-29 23:15:29 -070057 ninja -C _build || travis_terminate 1;
58 ninja -C _build test || travis_terminate 1;
Eric Engestrom3ad61542019-10-18 15:05:21 +010059 ninja -C _build install || travis_terminate 1;
Eric Engestrom64ffc282019-07-30 16:18:10 +010060 fi
61 - if test "x$BUILD" = xscons; then
Eric Engestrom690d3592019-10-29 09:24:36 +000062 scons force_scons=1 || travis_terminate 1;
63 scons force_scons=1 check || travis_terminate 1;
Eric Engestrom64ffc282019-07-30 16:18:10 +010064 fi