travis: add osx autotools build
authorJon Turney <jon.turney@dronecode.org.uk>
Thu, 18 Jan 2018 13:05:06 +0000 (13:05 +0000)
committerJon Turney <jon.turney@dronecode.org.uk>
Fri, 2 Feb 2018 15:28:52 +0000 (15:28 +0000)
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
.travis.yml

index b3dbb964685af145fd1bac287d1ddaacb9383686..5094208377446b7f2de334a3dbc0262f98e868c7 100644 (file)
@@ -396,6 +396,36 @@ matrix:
             - libexpat1-dev
             - libx11-xcb-dev
             - libelf-dev
+    - env:
+        - LABEL="macOS make"
+        - BUILD=make
+        - MAKEFLAGS="-j4"
+        - MAKE_CHECK_COMMAND="make check"
+        - DRI_LOADERS="--with-platforms=x11 --disable-egl"
+      os: osx
+
+before_install:
+  - |
+    if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
+      HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
+      # Set PATH for homebrew pip3 installs
+      PATH="$HOME/Library/Python/3.6/bin:${PATH}"
+      # Set PKG_CONFIG_PATH for keg-only expat
+      PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
+      # Set PATH for keg-only gettext
+      PATH="/usr/local/opt/gettext/bin:${PATH}"
+
+      # Install xquartz for prereqs ...
+      XQUARTZ_VERSION="2.7.11"
+      wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
+      hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
+      sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
+      hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
+      # ... and set paths
+      PATH="/opt/X11/bin:${PATH}"
+      PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
+      ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
+    fi
 
 install:
   - pip2 install --user mako