blob: c05ed55eeda3d9aac77cb107f0990556ed94b4cb [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
Eric Engestrom64ffc282019-07-30 16:18:10 +010016
Jon Turneyb3a1d952018-01-18 13:05:06 +000017before_install:
Eric Engestrom64ffc282019-07-30 16:18:10 +010018 - HOMEBREW_NO_AUTO_UPDATE=1 brew install expat gettext
19 - if test "x$BUILD" = xmeson; then
Eric Engestromb0853a42019-10-18 15:03:43 +010020 HOMEBREW_NO_AUTO_UPDATE=1 brew install ninja;
Eric Engestrom64ffc282019-07-30 16:18:10 +010021 fi
Eric Engestrom64ffc282019-07-30 16:18:10 +010022
Eric Engestrom6e5728e2019-05-09 13:28:41 +010023 # Set PATH for homebrew pip3 installs
Eric Engestrombc943d02019-12-21 19:28:07 +000024 - PYTHON_VERSION=$(python3 -V | awk '{print $2}' | cut -d. -f1-2)
25 - PATH="$HOME/Library/Python/$PYTHON_VERSION/bin:${PATH}"
Eric Engestrom6e5728e2019-05-09 13:28:41 +010026 # Set PKG_CONFIG_PATH for keg-only expat
27 - PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
28 # Set PATH for keg-only gettext
29 - PATH="/usr/local/opt/gettext/bin:${PATH}"
Jon Turneyb3a1d952018-01-18 13:05:06 +000030
Eric Engestrom6e5728e2019-05-09 13:28:41 +010031 # Install xquartz for prereqs ...
32 - XQUARTZ_VERSION="2.7.11"
33 - wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
34 - hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
35 - sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
36 - hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
37 # ... and set paths
38 - PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
Eric Anholt1c0ac192015-11-23 16:25:29 -080039
40install:
Eric Engestrom64ffc282019-07-30 16:18:10 +010041 - if test "x$BUILD" = xmeson; then
42 pip3 install --user meson;
43 pip3 install --user mako;
44 fi
Eric Engestromb3aa3702019-03-08 11:16:25 +000045
Eric Anholt1c0ac192015-11-23 16:25:29 -080046script:
Eric Engestrom64ffc282019-07-30 16:18:10 +010047 - if test "x$BUILD" = xmeson; then
48 meson _build -Dbuild-tests=true;
Vinson Lee029b07b2019-08-29 23:15:29 -070049 ninja -C _build || travis_terminate 1;
50 ninja -C _build test || travis_terminate 1;
Eric Engestrom3ad61542019-10-18 15:05:21 +010051 ninja -C _build install || travis_terminate 1;
Eric Engestrom64ffc282019-07-30 16:18:10 +010052 fi