forked from api7/lua-resty-etcd
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
50 lines (44 loc) · 1.34 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
os: linux
dist: xenial
sudo: required
addons:
apt:
packages:
- cpanminus
- build-essential
- libncurses5-dev
- libpcre3-dev
- libreadline-dev
- libssl-dev
- perl
- etcd
- luarocks
cache:
directories:
- download-cache
env:
global:
- JOBS=2
- OPENRESTY_PREFIX=/usr/local/openresty
- OPENRESTY_VER=`curl -s "https://api.github.com/repos/openresty/openresty/tags" | grep '"name"' | head -1 | grep -Po '([\d\.]+)'`
install:
- if [ ! -f download-cache/openresty-$OPENRESTY_VER.tar.gz ]; then
wget -P download-cache https://openresty.org/download/openresty-$OPENRESTY_VER.tar.gz;
fi
- git clone https://github.com/openresty/test-nginx.git test-nginx
- sudo luarocks install lua-resty-http
- sudo luarocks install lua-typeof
script:
- cd test-nginx && (sudo cpanm . > build.log 2>&1 || (cat build.log && exit 1)) && cd ..
- tar xzf download-cache/openresty-$OPENRESTY_VER.tar.gz &&
cd openresty-$OPENRESTY_VER
- ./configure --prefix=$OPENRESTY_PREFIX -j$JOBS
> build.log 2>&1 || (cat build.log && exit 1)
- make -j$JOBS > build.log 2>&1 ||
(cat build.log && exit 1)
- sudo make install > build.log 2>&1 ||
(cat build.log && exit 1)
- cd ..
- export PATH=$OPENRESTY_PREFIX/nginx/sbin:$PATH
- sudo service etcd start
- make test jobs=$JOBS