forked from xapian/xapian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
100 lines (98 loc) · 3.75 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Travis configuration for building Xapian. This is fairly intensive, so
# we only enable it for pull requests.
#
# Right now, we build on containerised linux, which defaults to the
# ancient Ubuntu 12.04 LTS. Specify "dist: trusty" so we get something
# which is "only" 2.5 years old.
dist: trusty
sudo: false
language: cpp
env:
global:
# Tell bootstrap where to clone ./common from
- XAPIAN_COMMON_CLONE_URL=https://github.com/xapian/xapian.git
- HOMEBREW_PACKAGES='help2man graphviz pngcrush libmagic pcre libsvm lua mono python3'
matrix:
include:
- compiler: gcc
os: linux
addons:
apt:
packages:
- doxygen
- graphviz
- help2man
- python-docutils
- pngcrush
- python-sphinx
- uuid-dev
- libpcre3-dev
- libmagic-dev
- lua5.2
- liblua5.2-dev
- mono-devel
- python-dev
- python3-dev
- tcl
- libsvm-dev
- compiler: clang
os: linux
# Clang is already installed, but we want to build using the
# llvm c++ library, not the GCC one. (Otherwise, depending on
# the GCC version, there can be issues.)
addons:
apt:
packages:
- doxygen
- graphviz
- help2man
- python-docutils
- pngcrush
- python-sphinx
- uuid-dev
- libpcre3-dev
- libmagic-dev
- tcl
- libsvm-dev
- libc++-dev
# We also have to disable an error, because (older?)
# perl header files don't play nicely with clang.
env: USE_CC=clang USE_CXX='clang++ -stdlib=libc++' CXXFLAGS=-Wno-error=reserved-user-defined-literal
- os: osx
before_install:
- brew update
# Work-around crash in doxygen 1.8.13 XML backend:
# https://github.com/xapian/xapian/pull/132
- brew install doxygen --HEAD
# "brew install" unhelpfully errors out if any package listed is
# already installed and up-to-date, but travis change what's installed
# by default from time to time so it's brittle to just filter out those
# installed by default from the list we need. Instead we ignore the
# exit status from "brew install", then check that
# "brew list --versions" says all the packages requested are installed.
- brew install $HOMEBREW_PACKAGES || true
- brew list --versions $HOMEBREW_PACKAGES
- pip install sphinx docutils
- pip3 install sphinx
- mkdir -p /tmp/xapian-libsvm-fixed-include
- ln -sF "`ls -1d /usr/local/Cellar/libsvm/3.*/include|tail -n 1`" /tmp/xapian-libsvm-fixed-include/libsvm
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'
- os: linux
# (Ab)use env to label this build:
env: dummy="Automated run of xapian-check-patch"
# Override before_script to do nothing
before_script:
# Override script to diff from against the branch point from:
# * for a PR, the branch the PR targets
# * otherwise, master
script:
- git diff `[ "$TRAVIS_PULL_REQUEST" = false ] && echo master || echo "$TRAVIS_BRANCH"`...|xapian-maintainer-tools/xapian-check-patch
before_script:
# Bootstrap everything (including letor, which isn't done
# by default), then configure using our chosen compiler.
- ./bootstrap xapian-core xapian-applications/omega swig xapian-bindings xapian-letor
- ./configure $confargs CC="$USE_CC" CXX="$USE_CXX"
script:
- make
- $installcore
- make check VERBOSE=1 AUTOMATED_TESTING=1