-
Notifications
You must be signed in to change notification settings - Fork 29
/
.travis.yml
80 lines (71 loc) · 2.55 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
sudo: required
dist: trusty
language: cpp
services:
- docker
matrix:
include:
- env:
- DIST=centos
- VERSION=6
- env:
- DIST=centos
- VERSION=7
- env:
- DIST=centos
- VERSION=7
- SCL=devtoolset-4 # gcc 5.2 (enabled function multiversioning)
- env:
- DIST=ubuntu
- VERSION=12.04
- env:
- DIST=ubuntu
- VERSION=14.04
- env:
- DIST=ubuntu
- VERSION=16.04 # gcc 5.3 (enabled function multiversioning)
before_install:
- docker pull ${DIST}:${VERSION}
- docker run -w /root --name test -d ${DIST}:${VERSION} sleep infinity
- docker cp . test:/root/
- if [ "$DIST" == "centos" ]; then
if [ $VERSION -eq 6 ]; then
docker exec test rpm -Uvh http://download.jubat.us/yum/rhel/6/stable/x86_64/jubatus-release-6-2.el6.x86_64.rpm;
elif [ $VERSION -eq 7 ]; then
docker exec test rpm -Uvh http://download.jubat.us/yum/rhel/7/stable/x86_64/jubatus-release-7-2.el7.x86_64.rpm;
fi;
if [ -n "$SCL" ]; then
docker exec test yum -y install centos-release-scl;
fi;
fi
install:
- if [ "$DIST" == "centos" ]; then
docker exec test yum -y install redhat-lsb gcc-c++ bzip2 msgpack-devel oniguruma-devel;
if [ -n "$SCL" ]; then
docker exec test yum -y install ${SCL}-gcc-c++ ${SCL}-binutils;
docker exec test bash -c "echo 'source scl_source enable ${SCL}' > /root/.bashrc";
fi;
fi
- if [ "$DIST" == "ubuntu" ]; then
docker exec test apt-get update;
docker exec test apt-get -qq install lsb-release autoconf automake make g++ python2.7 wget tar bzip2 libmsgpack-dev;
docker exec test bash -c "wget --no-check-certificate https://github.com/kkos/oniguruma/releases/download/v5.9.6/onig-5.9.6.tar.gz && tar xvf onig-5.9.6.tar.gz && cd onig-5.9.6 && ./configure --prefix=/usr && make && make install && ldconfig";
if [ "$VERSION" != "12.04" ]; then
docker exec test ln -sf /usr/bin/python2.7 /usr/bin/python;
fi;
fi
before_script:
- docker exec test lsb_release -a
- docker exec -t test bash -ic "g++ --version"
script:
- docker exec -t test bash -ic "./waf configure --prefix=/usr"
- docker exec -t test bash -ic "./waf build --checkall"
- docker exec -t test bash -ic "./waf cpplint"
- if [ -n "$SCL" ]; then docker exec test ./waf build --checkall; fi
- docker exec -t test bash -ic "./waf install; ldconfig; python -c 'import ctypes; ctypes.cdll.LoadLibrary(\"libjubatus_core.so\")'"
branches:
only:
- master
- develop
notifications:
email: false