Add reproducer for inline function ODR violation
[xapian.git] / .travis.yml
blob4192bdccb32403cc2eeec1d08ae187297276a23d
1 dist: trusty
2 sudo: false
3 language: cpp
4 notifications:
5   irc: "chat.freenode.net#xapian-devel"
6 env:
7   global:
8     # Tell bootstrap where to clone ./common from
9     - XAPIAN_COMMON_CLONE_URL=https://github.com/xapian/xapian.git
10     - HOMEBREW_PACKAGES='doxygen help2man graphviz pngcrush libmagic pcre lua mono python2 python'
11 matrix:
12   include:
13     - compiler: gcc
14       os: linux
15       addons:
16         apt:
17           sources:
18             - ubuntu-toolchain-r-test
19           packages:
20             - doxygen
21             - graphviz
22             - help2man
23             - python-docutils
24             - pngcrush
25             - python-sphinx
26             - uuid-dev
27             - libpcre3-dev
28             - libmagic-dev
29             - lua5.2
30             - liblua5.2-dev
31             - mono-devel
32             - python-dev
33             - python3-dev
34             - tcl
35             - gcc-4.7
36             - g++-4.7
37       env: USE_CC=gcc-4.7 USE_CXX=g++-4.7
38     - compiler: clang
39       os: linux
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.)
43       addons:
44         apt:
45           packages:
46             - doxygen
47             - graphviz
48             - help2man
49             - python-docutils
50             - pngcrush
51             - python-sphinx
52             - uuid-dev
53             - libpcre3-dev
54             - libmagic-dev
55             - tcl
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         # 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
67         # recent homebrew.
68         - brew upgrade python
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
78         - pip3 install sphinx
79       env: PYTHON2=/usr/local/bin/python2 CXXFLAGS=-Wno-error=reserved-user-defined-literal confargs=--prefix=/Users/travis/XapianInstall installcore='make -C xapian-core install'
80     - os: linux
81       # (Ab)use env to label this build:
82       env: dummy="Automated run of xapian-check-patch"
83       # Override before_script to do nothing
84       before_script:
85       # Override script to diff from against the branch point from:
86       # * for a PR, the branch the PR targets
87       # * otherwise, master
88       script:
89         - git diff `[ "$TRAVIS_PULL_REQUEST" = false ] && echo master || echo "$TRAVIS_BRANCH"`...|xapian-maintainer-tools/xapian-check-patch
92 before_script:
93   # Bootstrap everything, then configure using our chosen compiler.
94   - ./bootstrap
95   - ./configure $confargs CC="$USE_CC" CXX="$USE_CXX"
96 script:
97   - make
98   - $installcore
99   - make check VERBOSE=1 AUTOMATED_TESTING=1
100   # grep '^' passes through all input while giving a non-zero exit status if
101   # that input is empty.
102   - git status --porcelain|grep '^' && { echo "The generated files listed above are not in .gitignore" ; exit 1; }; true