-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
93 lines (87 loc) · 3.89 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
sudo: required
dist: trusty
language: python
services:
- docker
matrix:
include:
- env:
- DIST=centos
- VERSION=6
- env:
- DIST=centos
- VERSION=7
- env:
- DIST=ubuntu
- VERSION=14.04
- env:
- DIST=ubuntu
- VERSION=16.04
- env:
- DIST=quay.io/pypa/manylinux2010_x86_64
- VERSION=latest
before_install:
- docker pull ${DIST}:${VERSION}
- docker run -v $(pwd):/io -w /io --name test -d ${DIST}:${VERSION} sleep infinity
- 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;
docker exec test rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.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;
elif [ "$DIST" == "ubuntu" ]; then
if [ "$VERSION" == "14.04" ]; then
docker exec test sh -c "echo 'deb http://download.jubat.us/apt/ubuntu/trusty binary/' > /etc/apt/sources.list.d/jubatus.list";
elif [ "$VERSION" == "16.04" ]; then
docker exec test sh -c "echo 'deb http://download.jubat.us/apt/ubuntu/xenial binary/' > /etc/apt/sources.list.d/jubatus.list";
fi;
fi
install:
- if [ "$DIST" == "centos" ]; then
docker exec test yum -y install gcc-c++ python-devel epel-release;
if [ $VERSION -eq 6 ]; then
docker exec test yum -y install centos-release-scl-rh;
docker exec test yum -y install python27 python27-python-pip;
else
docker exec test yum -y install python-pip;
fi;
if [ "$TRAVIS_BRANCH" == "master" ]; then
docker exec test yum -y install jubatus-core-devel;
fi;
fi
- if [ "$DIST" == "ubuntu" ]; then
docker exec test apt-get -y update;
docker exec test apt-get --force-yes -y install python-dev python-pip g++;
if [ "$TRAVIS_BRANCH" == "master" ]; then
docker exec test apt-get --force-yes -y install jubatus;
fi;
fi
- if [ "$DIST" == "centos" ] && [ $VERSION -eq 6 ]; then
docker exec test /usr/bin/scl enable python27 -- pip install --upgrade pip setuptools cython;
elif [ "$DIST" != "quay.io/pypa/manylinux2010_x86_64" ]; then
docker exec test pip install --upgrade pip setuptools cython;
fi
- if [ "$TRAVIS_BRANCH" != "master" ]; then
if [ "$DIST" == "centos" ]; then
docker exec test yum -y install git bzip2 msgpack-devel-0.5.9;
docker exec test git clone -b develop https://github.com/jubatus/jubatus_core.git;
docker exec test bash -ic "cd jubatus_core; ./waf configure --prefix=/usr --regexp-library=none && ./waf build && ./waf install && ldconfig";
elif [ "$DIST" == "ubuntu" ]; then
docker exec test apt-get --force-yes -y install git bzip2 libmsgpack-dev;
docker exec test git clone -b develop https://github.com/jubatus/jubatus_core.git;
docker exec test bash -ic "cd jubatus_core; ./waf configure --prefix=/usr --regexp-library=none && ./waf build && ./waf install";
fi;
fi
script:
- if [ "$DIST" == "centos" ]; then
if [ $VERSION -eq 6 ]; then
docker exec -t test /usr/bin/scl enable python27 -- bash -ic "pip install -r requirements.txt && pip install -e . && pip install scipy && python ./setup.py test";
else
docker exec -t test bash -ic "pip install -r requirements.txt && pip install -e . && pip install scipy && python ./setup.py test";
fi;
elif [ "$DIST" == "ubuntu" ]; then
docker exec -t test bash -ic "source /opt/jubatus/profile; pip install -r requirements.txt && pip install -e . && pip install scipy && python ./setup.py test";
elif [ "$DIST" == "quay.io/pypa/manylinux2010_x86_64" ]; then
docker exec -t test bash build-wheels.sh build_wheels;
fi