ci: Enable builds on macOS

Use Travis's macOS builder to check if Epoxy is building on that
platform.
macos/v1.5.9
Emmanuele Bassi 7 years ago
parent 8c3d371187
commit 02a5e55f21
  1. 28
      .travis.yml
  2. 0
      .travis/epoxy-ci-linux.sh
  3. 19
      .travis/epoxy-ci-osx.sh

@ -7,6 +7,7 @@ branches:
os: os:
- linux - linux
- osx
compiler: compiler:
- gcc - gcc
@ -18,13 +19,29 @@ language:
services: services:
- docker - docker
matrix:
exclude:
- os: osx
compiler: gcc
before_install: before_install:
- docker pull ebassi/epoxyci - |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
brew install python@3 meson
# Use a Ninja with QuLogic's patch: https://github.com/ninja-build/ninja/issues/1219
mkdir -p $HOME/tools; curl -L http://nirbheek.in/files/binaries/ninja/macos/ninja -o $HOME/tools/ninja; chmod +x $HOME/tools/ninja
fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull ebassi/epoxyci ; fi
before_script: before_script:
- echo FROM ebassi/epoxyci > Dockerfile - |
- echo ADD . /root >> Dockerfile if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
- docker build -t withgit . echo FROM ebassi/epoxyci > Dockerfile
echo ADD . /root >> Dockerfile
echo WORKDIR /root >> Dockerfile
docker build -t withgit .
fi
env: env:
- BUILD_OPTS="" - BUILD_OPTS=""
@ -33,4 +50,5 @@ env:
- BUILD_OPTS="-Dx11=false" - BUILD_OPTS="-Dx11=false"
script: script:
- docker run withgit /bin/sh -c "CC=$CC ./epoxy-run-tests.sh $BUILD_OPTS" - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "CC=$CC .travis/epoxy-ci-linux.sh $BUILD_OPTS" ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then /bin/sh -c "CC=$CC .travis/epoxy-ci-osx.sh $BUILD_OPTS" ; fi

@ -0,0 +1,19 @@
#!/bin/sh
export SDKROOT=$( xcodebuild -version -sdk macosx Path )
export CPPFLAGS=-I/usr/local/include
export LDFLAGS=-L/usr/local/lib
export OBJC=$CC
export PATH=$HOME/tools:$PATH
srcdir=$( pwd )
builddir=$( mktemp -d build_XXXXXX )
meson ${BUILDOPTS} $builddir $srcdir || exit $?
cd $builddir
ninja || exit $?
meson test || exit $?
cd ..
rm -rf $builddir
Loading…
Cancel
Save