Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 1 | language: c |
| 2 | |
Eric Engestrom | 6e5728e | 2019-05-09 13:28:41 +0100 | [diff] [blame] | 3 | os: osx |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 4 | |
| 5 | cache: |
Emil Velikov | 6431b98 | 2017-04-06 14:02:38 +0100 | [diff] [blame] | 6 | ccache: true |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 7 | |
Eric Engestrom | 6e0effb | 2019-02-07 11:36:19 +0000 | [diff] [blame] | 8 | env: |
| 9 | global: |
Eric Engestrom | 6e5728e | 2019-05-09 13:28:41 +0100 | [diff] [blame] | 10 | - PKG_CONFIG_PATH="" |
Jon Turney | b3a1d95 | 2018-01-18 13:05:06 +0000 | [diff] [blame] | 11 | |
Eric Engestrom | 64ffc28 | 2019-07-30 16:18:10 +0100 | [diff] [blame] | 12 | matrix: |
| 13 | include: |
| 14 | - env: |
| 15 | - BUILD=meson |
| 16 | - env: |
| 17 | - BUILD=scons |
| 18 | |
Jon Turney | b3a1d95 | 2018-01-18 13:05:06 +0000 | [diff] [blame] | 19 | before_install: |
Eric Engestrom | 64ffc28 | 2019-07-30 16:18:10 +0100 | [diff] [blame] | 20 | - HOMEBREW_NO_AUTO_UPDATE=1 brew install expat gettext |
| 21 | - if test "x$BUILD" = xmeson; then |
Eric Engestrom | b0853a4 | 2019-10-18 15:03:43 +0100 | [diff] [blame] | 22 | HOMEBREW_NO_AUTO_UPDATE=1 brew install ninja; |
Eric Engestrom | 64ffc28 | 2019-07-30 16:18:10 +0100 | [diff] [blame] | 23 | fi |
| 24 | - if test "x$BUILD" = xscons; then |
Eric Engestrom | b0853a4 | 2019-10-18 15:03:43 +0100 | [diff] [blame] | 25 | HOMEBREW_NO_AUTO_UPDATE=1 brew install scons; |
Eric Engestrom | 64ffc28 | 2019-07-30 16:18:10 +0100 | [diff] [blame] | 26 | fi |
| 27 | |
Eric Engestrom | 6e5728e | 2019-05-09 13:28:41 +0100 | [diff] [blame] | 28 | # 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 Turney | b3a1d95 | 2018-01-18 13:05:06 +0000 | [diff] [blame] | 34 | |
Eric Engestrom | 6e5728e | 2019-05-09 13:28:41 +0100 | [diff] [blame] | 35 | # 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 Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 43 | |
| 44 | install: |
Eric Engestrom | 64ffc28 | 2019-07-30 16:18:10 +0100 | [diff] [blame] | 45 | - 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 Engestrom | b3aa370 | 2019-03-08 11:16:25 +0000 | [diff] [blame] | 52 | |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 53 | script: |
Eric Engestrom | 64ffc28 | 2019-07-30 16:18:10 +0100 | [diff] [blame] | 54 | - if test "x$BUILD" = xmeson; then |
| 55 | meson _build -Dbuild-tests=true; |
Vinson Lee | 029b07b | 2019-08-29 23:15:29 -0700 | [diff] [blame] | 56 | ninja -C _build || travis_terminate 1; |
| 57 | ninja -C _build test || travis_terminate 1; |
Eric Engestrom | 3ad6154 | 2019-10-18 15:05:21 +0100 | [diff] [blame^] | 58 | ninja -C _build install || travis_terminate 1; |
Eric Engestrom | 64ffc28 | 2019-07-30 16:18:10 +0100 | [diff] [blame] | 59 | fi |
| 60 | - if test "x$BUILD" = xscons; then |
Vinson Lee | 029b07b | 2019-08-29 23:15:29 -0700 | [diff] [blame] | 61 | scons || travis_terminate 1; |
| 62 | scons check || travis_terminate 1; |
Eric Engestrom | 64ffc28 | 2019-07-30 16:18:10 +0100 | [diff] [blame] | 63 | fi |