travis: Add OSX meson build to matrix

Unfortunately, a 'brew update' is currently needed to get the meson >=
0.46.0 required by xserver.
This commit is contained in:
Jon Turney 2019-04-19 15:37:22 +01:00 committed by Adam Jackson
parent 0bdfa5bc0a
commit f0e22a76c9
2 changed files with 38 additions and 14 deletions

View File

@ -1,18 +1,27 @@
language: c
cache: ccache
cache:
ccache: true
directories:
- $HOME/Library/Caches/Homebrew
branches:
except:
- /appveyor.*/
os: osx
osx_image: xcode9.2
matrix:
include:
- os: osx
osx_image: xcode9.2
env: DISTRO=xcode9.2
- env: TOOL=meson
- env: TOOL=autotools
install:
- HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache
- brew update
- HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache meson
script:
- ./test/scripts/build-travis-osx.sh
- ./test/scripts/build-travis-osx.sh $TOOL
- ccache -s
before_cache:
- brew cleanup

View File

@ -30,14 +30,29 @@ export PATH="/usr/local/opt/ccache/libexec:$PATH"
pushd $HOME
git clone git://anongit.freedesktop.org/git/xorg/proto/xorgproto
cd xorgproto
autoreconf -fvi
./configure --prefix=/opt/X11
sudo make install
if [[ "$1" == "autotools" ]]; then
autoreconf -fvi
./configure --prefix=/opt/X11
sudo make install
elif [[ "$1" == "meson" ]]; then
meson _build/ -Dprefix=/opt/X11
ninja -C _build/
sudo ninja -C _build/ install
else
echo "Unknown build tool $1"
exit 1
fi
popd
# build
autoreconf -fvi
./configure --prefix=/opt/X11 --disable-dependency-tracking --with-apple-application-name=XQuartz --with-bundle-id-prefix=org.macosforge.xquartz
make
make check
make install DESTDIR=$(pwd)/staging
if [[ "$1" == "autotools" ]]; then
autoreconf -fvi
./configure --prefix=/opt/X11 --disable-dependency-tracking --with-apple-application-name=XQuartz --with-bundle-id-prefix=org.macosforge.xquartz
make
make check
make install DESTDIR=$(pwd)/staging
elif [[ "$1" == "meson" ]]; then
meson _build/ -Dprefix=/opt/X11 -Dsecure-rpc=false
DESTDIR=$(pwd)/staging ninja -C _build/ install
ninja -C _build/ test
fi