From 8f628033bed408c4de215ca117fa2fa2d9f9d5cd Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 14 Mar 2018 12:54:16 -0400 Subject: [PATCH] travis: Update OSX build Install and use xorgproto, and build with optimization as clang has warnings that only work above -O0. Also expand the build matrix for both Xcode 8.3 and 9.2. Both images are OSX 10.12 at the moment so this is really just a way to test with clang 8 vs 9. Signed-off-by: Adam Jackson --- .travis.yml | 5 +++++ test/scripts/build-travis-osx.sh | 14 +++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 313234875..86b61f01c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,11 @@ matrix: services: docker env: DISTRO=rawhide:v3 - os: osx + osx_image: xcode9.2 + env: DISTRO=xcode9.2 + - os: osx + osx_image: xcode8.3 + env: DISTRO=xcode8.3 install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache ; fi diff --git a/test/scripts/build-travis-osx.sh b/test/scripts/build-travis-osx.sh index 86e96e0c5..6f3f9f3a7 100755 --- a/test/scripts/build-travis-osx.sh +++ b/test/scripts/build-travis-osx.sh @@ -1,5 +1,8 @@ #!/bin/sh +set -e +set -x + # # based on instructions for building xorg-server in https://www.xquartz.org/Developer-Info.html # @@ -15,7 +18,7 @@ hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION} export PATH="/opt/X11/bin:${PATH}" export PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}" export ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal" -export CFLAGS="-Wall -O0 -ggdb3 -arch i386 -arch x86_64 -pipe" +export CFLAGS="-Wall -O2 -ggdb3 -arch i386 -arch x86_64 -pipe" export CXXFLAGS=$CFLAGS export OBJCFLAGS=$CFLAGS export LDFLAGS=$CFLAGS @@ -23,6 +26,15 @@ export LDFLAGS=$CFLAGS # travis currently requires explicit ccache setup on OSX export PATH="/usr/local/opt/ccache/libexec:$PATH" +# need newer xorgproto +pushd $HOME +git clone git://anongit.freedesktop.org/git/xorg/proto/xorgproto +cd xorgproto +autoreconf -fvi +./configure --prefix=/opt/X11 +sudo make install +popd + # build autoreconf -fvi ./configure --prefix=/opt/X11 --disable-dependency-tracking --with-apple-application-name=XQuartz --with-bundle-id-prefix=org.macosforge.xquartz