[ci] Sort out Travis configuration
Use a matrix to avoid a gazillion if's.
This commit is contained in:
parent
5a6d2b986a
commit
3ce6c7bd96
|
@ -3,6 +3,8 @@
|
|||
set -x
|
||||
set -o errexit -o nounset
|
||||
|
||||
if test "x$TRAVIS_SECURE_ENV_VARS" != xtrue; then exit; fi
|
||||
|
||||
BRANCH="$TRAVIS_BRANCH"
|
||||
if test "x$BRANCH" != xmaster; then exit; fi
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
set -o errexit -o nounset
|
||||
|
||||
if test "x$TRAVIS_SLUG" != x"harfbuzz/harfbuzz"; then exit; fi
|
||||
|
||||
pip install --user nose
|
||||
pip install --user cpp-coveralls
|
||||
export PATH=$HOME/.local/bin:$PATH
|
||||
|
||||
rm -f src/.libs/NONE.gcov
|
||||
touch src/NONE
|
||||
coveralls -e docs
|
63
.travis.yml
63
.travis.yml
|
@ -1,39 +1,54 @@
|
|||
# Build Configuration for Travis
|
||||
sudo: required # For Trusty beta
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
dist: trusty
|
||||
|
||||
language: cpp
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
|
||||
env:
|
||||
global:
|
||||
- CPPFLAGS=""
|
||||
- CFLAGS="-Werror --coverage"
|
||||
- CXXFLAGS="-Werror -Wno-deprecated-register --coverage" # glib uses register and clang raises a warning
|
||||
- LDFLAGS="--coverage"
|
||||
install:
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then pip install --user nose; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then pip install --user cpp-coveralls; fi # for coveralls.io code coverage tracking
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export PATH=$HOME/.local/bin:$PATH; fi # Make sure we can find the above Python packages
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export CXXFLAGS="$CXXFLAGS -Wno-deprecated-declarations"; fi; # https://github.com/harfbuzz/harfbuzz/issues/345
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi;
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew uninstall libtool && brew install libtool; fi # Workaround Travis/brew bug
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install ragel freetype glib gobject-introspection cairo icu4c graphite2; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew link --force icu4c; fi # icu4c is keg-only
|
||||
script:
|
||||
- NOCONFIGURE=1 ./autogen.sh
|
||||
- export CONFIGURE_OPTS="--with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2"
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" -a "$CC" == "gcc" ]; then export CONFIGURE_OPTS="$CONFIGURE_OPTS --enable-gtk-doc"; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export CONFIGURE_OPTS="$CONFIGURE_OPTS --with-coretext"; fi
|
||||
- CONFIGURE_OPTS="--with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2"
|
||||
- NOCONFIGURE=1
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
script:
|
||||
- ./autogen.sh
|
||||
- ./configure $CONFIGURE_OPTS --enable-gtk-doc
|
||||
- make
|
||||
- make check || (cat */test-suite.log test/*/test-suite.log && false)
|
||||
after_success:
|
||||
- bash .ci/run-coveralls.sh # for coveralls.io code coverage tracking
|
||||
- bash .ci/deploy-docs.sh
|
||||
|
||||
- os: linux
|
||||
compiler: clang
|
||||
script:
|
||||
- ./autogen.sh
|
||||
- ./configure $CONFIGURE_OPTS
|
||||
- make
|
||||
- make check || (cat */test-suite.log test/*/test-suite.log && false)
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" -a "$CC" == "gcc" -a "$TRAVIS_SLUG" == "harfbuzz/harfbuzz" ]; then rm -f src/.libs/NONE.gcov; touch src/NONE; coveralls -e docs; fi
|
||||
after_success:
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" -a "$CC" == "gcc" -a "$TRAVIS_SECURE_ENV_VARS" == "true" ]; then bash .ci/deploy-docs.sh; fi
|
||||
|
||||
- os: osx
|
||||
compiler: clang
|
||||
install:
|
||||
# https://github.com/harfbuzz/harfbuzz/issues/345
|
||||
- export CXXFLAGS="$CXXFLAGS -Wno-deprecated-declarations"
|
||||
- brew update;
|
||||
# Workaround Travis/brew bug
|
||||
- brew uninstall libtool && brew install libtool
|
||||
- brew install ragel freetype glib gobject-introspection cairo icu4c graphite2
|
||||
- brew link --force icu4c # icu4c is keg-only
|
||||
script:
|
||||
- ./autogen.sh
|
||||
- ./configure $CONFIGURE_OPTS --with-coretext
|
||||
- make
|
||||
- make check || (cat */test-suite.log test/*/test-suite.log && false)
|
||||
|
||||
notifications:
|
||||
irc: "irc.freenode.org#harfbuzz"
|
||||
email: harfbuzz@lists.freedesktop.org
|
||||
|
|
Loading…
Reference in New Issue