1 # Right now, we build on containerised linux, which defaults to the
2 # ancient Ubuntu 12.04 LTS. Specify "dist: trusty" so we get something
3 # which is "only" 2.5 years old.
8 irc: "chat.freenode.net#xapian-devel"
11 # Tell bootstrap where to clone ./common from
12 - XAPIAN_COMMON_CLONE_URL=https://github.com/xapian/xapian.git
13 - HOMEBREW_PACKAGES='doxygen help2man graphviz pngcrush libmagic pcre libsvm lua mono python2 python'
39 # Clang is already installed, but we want to build using the
40 # llvm c++ library, not the GCC one. (Otherwise, depending on
41 # the GCC version, there can be issues.)
57 # We also have to disable an error, because (older?)
58 # perl header files don't play nicely with clang.
59 env: USE_CC=clang USE_CXX='clang++ -stdlib=libc++' CXXFLAGS=-Wno-error=reserved-user-defined-literal
63 # python is now python3, but the travis macOS build isn't there yet
64 # so we need to explicitly upgrade otherwise we end up with the old
65 # python (which is 2.7.x) and the python2 package (which is also
66 # 2.7.x). This step can be removed once travis ships with a more
69 # "brew install" unhelpfully errors out if any package listed is
70 # already installed and up-to-date, but travis change what's installed
71 # by default from time to time so it's brittle to just filter out those
72 # installed by default from the list we need. Instead we ignore the
73 # exit status from "brew install", then check later that
74 # "brew list --versions" says all the packages requested are installed.
75 - brew install $HOMEBREW_PACKAGES || true
76 - brew list --versions $HOMEBREW_PACKAGES
77 - pip2 install sphinx docutils
79 - mkdir -p /tmp/xapian-libsvm-fixed-include
80 - ln -sF "`ls -1d /usr/local/Cellar/libsvm/3.*/include|tail -n 1`" /tmp/xapian-libsvm-fixed-include/libsvm
81 env: PYTHON2=/usr/local/bin/python2 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'
83 # (Ab)use env to label this build:
84 env: dummy="Automated run of xapian-check-patch"
85 # Override before_script to do nothing
87 # Override script to diff from against the branch point from:
88 # * for a PR, the branch the PR targets
91 - git diff `[ "$TRAVIS_PULL_REQUEST" = false ] && echo master || echo "$TRAVIS_BRANCH"`...|xapian-maintainer-tools/xapian-check-patch
95 # Bootstrap everything (including letor, which isn't done
96 # by default), then configure using our chosen compiler.
97 - ./bootstrap xapian-core xapian-applications/omega swig xapian-bindings xapian-letor
98 - ./configure $confargs CC="$USE_CC" CXX="$USE_CXX"
102 - make check VERBOSE=1 AUTOMATED_TESTING=1
103 # grep '^' passes through all input while giving a non-zero exit status if
104 # that input is empty.
105 - git status --porcelain|grep '^' && { echo "The generated files listed above are not in .gitignore" ; exit 1; }; true