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 <ajax@redhat.com>
This commit is contained in:
Adam Jackson 2018-03-14 12:54:16 -04:00
parent 1ca092f990
commit 8f628033be
2 changed files with 18 additions and 1 deletions

View File

@ -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

View File

@ -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