Use https for tarball URLs in .spec files
[xapian.git] / .travis.yml
blob0cd8c5c3822e8a6570c0cfef447522747dcbe552
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.
7 dist: trusty
8 sudo: false
9 language: cpp
10 env:
11   global:
12     # Tell bootstrap where to clone ./common from
13     - XAPIAN_COMMON_CLONE_URL=https://github.com/xapian/xapian.git
14     - HOMEBREW_PACKAGES='doxygen help2man graphviz pngcrush libmagic pcre libsvm lua mono python2 python'
15 matrix:
16   include:
17     - compiler: gcc
18       os: linux
19       addons:
20         apt:
21           packages:
22             - doxygen
23             - graphviz
24             - help2man
25             - python-docutils
26             - pngcrush
27             - python-sphinx
28             - uuid-dev
29             - libpcre3-dev
30             - libmagic-dev
31             - lua5.2
32             - liblua5.2-dev
33             - mono-devel
34             - python-dev
35             - python3-dev
36             - tcl
37             - libsvm-dev
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             - libsvm-dev
57             - libc++-dev
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
61     - os: osx
62       before_install:
63         - brew update
64         # python is now python3, but the travis macOS build isn't there yet
65         # so we need to explicitly upgrade otherwise we end up with the old
66         # python (which is 2.7.x) and the python2 package (which is also
67         # 2.7.x). This step can be removed once travis ships with a more
68         # recent homebrew.
69         - brew upgrade python
70         # "brew install" unhelpfully errors out if any package listed is
71         # already installed and up-to-date, but travis change what's installed
72         # by default from time to time so it's brittle to just filter out those
73         # installed by default from the list we need.  Instead we ignore the
74         # exit status from "brew install", then check later that
75         # "brew list --versions" says all the packages requested are installed.
76         - brew install $HOMEBREW_PACKAGES || true
77         - brew list --versions $HOMEBREW_PACKAGES
78         - pip2 install sphinx docutils
79         - pip3 install sphinx
80         - mkdir -p /tmp/xapian-libsvm-fixed-include
81         - ln -sF "`ls -1d /usr/local/Cellar/libsvm/3.*/include|tail -n 1`" /tmp/xapian-libsvm-fixed-include/libsvm
82       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     - os: linux
84       # (Ab)use env to label this build:
85       env: dummy="Automated run of xapian-check-patch"
86       # Override before_script to do nothing
87       before_script:
88       # Override script to diff from against the branch point from:
89       # * for a PR, the branch the PR targets
90       # * otherwise, master
91       script:
92         - git diff `[ "$TRAVIS_PULL_REQUEST" = false ] && echo master || echo "$TRAVIS_BRANCH"`...|xapian-maintainer-tools/xapian-check-patch
95 before_script:
96   # Bootstrap everything (including letor, which isn't done
97   # by default), then configure using our chosen compiler.
98   - ./bootstrap xapian-core xapian-applications/omega swig xapian-bindings xapian-letor
99   - ./configure $confargs CC="$USE_CC" CXX="$USE_CXX"
100 script:
101   - make
102   - $installcore
103   - make check VERBOSE=1 AUTOMATED_TESTING=1
104   # grep '^' passes through all input while giving a non-zero exit status if
105   # that input is empty.
106   - git status --porcelain|grep '^' && { echo "The generated files listed above are not in .gitignore" ; exit 1; }; true