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 |
Eric Engestrom | bc943d0 | 2019-12-21 19:28:07 +0000 | [diff] [blame^] | 29 | - PYTHON_VERSION=$(python3 -V | awk '{print $2}' | cut -d. -f1-2) |
| 30 | - PATH="$HOME/Library/Python/$PYTHON_VERSION/bin:${PATH}" |
Eric Engestrom | 6e5728e | 2019-05-09 13:28:41 +0100 | [diff] [blame] | 31 | # 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 Turney | b3a1d95 | 2018-01-18 13:05:06 +0000 | [diff] [blame] | 35 | |
Eric Engestrom | 6e5728e | 2019-05-09 13:28:41 +0100 | [diff] [blame] | 36 | # 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 Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 44 | |
| 45 | install: |
Eric Engestrom | 64ffc28 | 2019-07-30 16:18:10 +0100 | [diff] [blame] | 46 | - 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 Engestrom | b3aa370 | 2019-03-08 11:16:25 +0000 | [diff] [blame] | 53 | |
Eric Anholt | 1c0ac19 | 2015-11-23 16:25:29 -0800 | [diff] [blame] | 54 | script: |
Eric Engestrom | 64ffc28 | 2019-07-30 16:18:10 +0100 | [diff] [blame] | 55 | - if test "x$BUILD" = xmeson; then |
| 56 | meson _build -Dbuild-tests=true; |
Vinson Lee | 029b07b | 2019-08-29 23:15:29 -0700 | [diff] [blame] | 57 | ninja -C _build || travis_terminate 1; |
| 58 | ninja -C _build test || travis_terminate 1; |
Eric Engestrom | 3ad6154 | 2019-10-18 15:05:21 +0100 | [diff] [blame] | 59 | ninja -C _build install || travis_terminate 1; |
Eric Engestrom | 64ffc28 | 2019-07-30 16:18:10 +0100 | [diff] [blame] | 60 | fi |
| 61 | - if test "x$BUILD" = xscons; then |
Eric Engestrom | 690d359 | 2019-10-29 09:24:36 +0000 | [diff] [blame] | 62 | scons force_scons=1 || travis_terminate 1; |
| 63 | scons force_scons=1 check || travis_terminate 1; |
Eric Engestrom | 64ffc28 | 2019-07-30 16:18:10 +0100 | [diff] [blame] | 64 | fi |