Improve fallback unique terms lower bound
[xapian.git] / .travis.yml
blobe63130cc09f416a873789d2a381fe1faca6ba5cb
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.
4 dist: trusty
5 sudo: false
6 language: cpp
7 notifications:
8   irc: "chat.freenode.net#xapian-devel"
9 env:
10   global:
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'
14 matrix:
15   include:
16     - compiler: gcc
17       os: linux
18       addons:
19         apt:
20           packages:
21             - doxygen
22             - graphviz
23             - help2man
24             - python-docutils
25             - pngcrush
26             - python-sphinx
27             - uuid-dev
28             - libpcre3-dev
29             - libmagic-dev
30             - lua5.2
31             - liblua5.2-dev
32             - mono-devel
33             - python-dev
34             - python3-dev
35             - tcl
36             - libsvm-dev
37     - compiler: clang
38       os: linux
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.)
42       addons:
43         apt:
44           packages:
45             - doxygen
46             - graphviz
47             - help2man
48             - python-docutils
49             - pngcrush
50             - python-sphinx
51             - uuid-dev
52             - libpcre3-dev
53             - libmagic-dev
54             - tcl
55             - libsvm-dev
56             - libc++-dev
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
60     - os: osx
61       before_install:
62         - brew update
63         # "brew install" unhelpfully errors out if any package listed is
64         # already installed and up-to-date, but travis change what's installed
65         # by default from time to time so it's brittle to just filter out those
66         # installed by default from the list we need.  Instead we ignore the
67         # exit status from "brew install", then check later that
68         # "brew list --versions" says all the packages requested are installed.
69         - brew install $HOMEBREW_PACKAGES || true
70         - brew list --versions $HOMEBREW_PACKAGES
71         - pip2 install sphinx docutils
72         - pip3 install sphinx
73         - mkdir -p /tmp/xapian-libsvm-fixed-include
74         - ln -sF "`ls -1d /usr/local/Cellar/libsvm/3.*/include|tail -n 1`" /tmp/xapian-libsvm-fixed-include/libsvm
75       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'
76     - os: linux
77       # (Ab)use env to label this build:
78       env: dummy="Automated run of xapian-check-patch"
79       # Override before_script to do nothing
80       before_script:
81       # Override script to diff from against the branch point from:
82       # * for a PR, the branch the PR targets
83       # * otherwise, master
84       script:
85         - git diff `[ "$TRAVIS_PULL_REQUEST" = false ] && echo master || echo "$TRAVIS_BRANCH"`...|xapian-maintainer-tools/xapian-check-patch
88 before_script:
89   # Bootstrap everything (including letor, which isn't done
90   # by default), then configure using our chosen compiler.
91   - ./bootstrap xapian-core xapian-applications/omega swig xapian-bindings xapian-letor
92   - ./configure $confargs CC="$USE_CC" CXX="$USE_CXX"
93 script:
94   - make
95   - $installcore
96   - make check VERBOSE=1 AUTOMATED_TESTING=1
97   # grep '^' passes through all input while giving a non-zero exit status if
98   # that input is empty.
99   - git status --porcelain|grep '^' && { echo "The generated files listed above are not in .gitignore" ; exit 1; }; true