1 # Travis configuration for building Xapian. This is fairly intensive, so
2 # we only enable it for pull requests.
4 # Right now, we build on containerised linux, which defaults to the
5 # ancient Ubuntu 12.04 LTS. Specify "dist: trusty" so we get something
6 # which is "only" 2.5 years old.
12 # Tell bootstrap where to clone ./common from
13 - XAPIAN_COMMON_CLONE_URL=https://github.com/xapian/xapian.git
14 - HOMEBREW_PACKAGES='help2man graphviz pngcrush libmagic pcre libsvm lua mono python3'
40 # Clang is already installed, but we want to build using the
41 # llvm c++ library, not the GCC one. (Otherwise, depending on
42 # the GCC version, there can be issues.)
58 # We also have to disable an error, because (older?)
59 # perl header files don't play nicely with clang.
60 env: USE_CC=clang USE_CXX='clang++ -stdlib=libc++' CXXFLAGS=-Wno-error=reserved-user-defined-literal
64 # Work-around crash in doxygen 1.8.13 XML backend:
65 # https://github.com/xapian/xapian/pull/132
66 - brew install doxygen --HEAD
67 # "brew install" unhelpfully errors out if any package listed is
68 # already installed and up-to-date, but travis change what's installed
69 # by default from time to time so it's brittle to just filter out those
70 # installed by default from the list we need. Instead we ignore the
71 # exit status from "brew install", then check that
72 # "brew list --versions" says all the packages requested are installed.
73 - brew install $HOMEBREW_PACKAGES || true
74 - brew list --versions $HOMEBREW_PACKAGES
75 - pip install sphinx docutils
77 - mkdir -p /tmp/xapian-libsvm-fixed-include
78 - ln -sF "`ls -1d /usr/local/Cellar/libsvm/3.*/include|tail -n 1`" /tmp/xapian-libsvm-fixed-include/libsvm
79 env: CXXFLAGS=-Wno-error=reserved-user-defined-literal CPPFLAGS=-I/tmp/xapian-libsvm-fixed-include confargs=--prefix=/Users/travis/XapianInstall installcore='make -C xapian-core install'
81 # (Ab)use env to label this build:
82 env: dummy="Automated run of xapian-check-patch"
83 # Override before_script to do nothing
85 # Override script to diff from against the branch point from:
86 # * for a PR, the branch the PR targets
89 - git diff `[ "$TRAVIS_PULL_REQUEST" = false ] && echo master || echo "$TRAVIS_BRANCH"`...|xapian-maintainer-tools/xapian-check-patch
93 # Bootstrap everything (including letor, which isn't done
94 # by default), then configure using our chosen compiler.
95 - ./bootstrap xapian-core xapian-applications/omega swig xapian-bindings xapian-letor
96 - ./configure $confargs CC="$USE_CC" CXX="$USE_CXX"
100 - make check -C xapian-bindings VERBOSE=1 AUTOMATED_TESTING=1