-
Notifications
You must be signed in to change notification settings - Fork 46
/
.travis.yml
59 lines (51 loc) · 2.28 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
# vim: st=2 sts=2 sw=2 et:
sudo: false
language: c
compiler: gcc
notifications:
email: false
cache:
directories:
- download-cache
- perl5
env:
global:
- JOBS=2
- LUAROCKS_VER=2.4.3
matrix:
- OPENRESTY_VER=1.11.2.2
- OPENRESTY_VER=1.11.2.3
- OPENRESTY_VER=1.11.2.4
- OPENRESTY_VER=1.11.2.5
- OPENRESTY_VER=1.13.6.1
- OPENRESTY_VER=1.13.6.2
- LINT=1
install:
- mkdir -p download-cache
- if [ -z "$OPENRESTY_VER" ]; then export OPENRESTY_VER=1.13.6.2; fi
- if [ ! -f download-cache/openresty-$OPENRESTY_VER.tar.gz ]; then wget -O download-cache/openresty-$OPENRESTY_VER.tar.gz http://openresty.org/download/openresty-$OPENRESTY_VER.tar.gz; fi
- if [ ! -f download-cache/luarocks-$LUAROCKS_VER.tar.gz ]; then wget -O download-cache/luarocks-$LUAROCKS_VER.tar.gz https://luarocks.github.io/luarocks/releases/luarocks-$LUAROCKS_VER.tar.gz; fi
- if [ ! -f download-cache/cpanm ]; then wget -O download-cache/cpanm https://cpanmin.us/; fi
- tar -zxf download-cache/openresty-$OPENRESTY_VER.tar.gz
- tar -zxf download-cache/luarocks-$LUAROCKS_VER.tar.gz
- chmod +x download-cache/cpanm
- download-cache/cpanm --notest Test::Nginx > build.log 2>&1 || (cat build.log && exit 1)
- download-cache/cpanm --notest --local-lib=$TRAVIS_BUILD_DIR/perl5 local::lib && eval $(perl -I $TRAVIS_BUILD_DIR/perl5/lib/perl5/ -Mlocal::lib)
- pushd openresty-$OPENRESTY_VER
- export OPENRESTY_PREFIX=$TRAVIS_BUILD_DIR/openresty-$OPENRESTY_VER
- ./configure --prefix=$OPENRESTY_PREFIX --without-http_ssl_module -j$JOBS > build.log 2>&1 || (cat build.log && exit 1)
- make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1)
- make install > build.log 2>&1 || (cat build.log && exit 1)
- popd
- pushd luarocks-$LUAROCKS_VER
- export LUAROCKS_PREFIX=$TRAVIS_BUILD_DIR/luarocks-$LUAROCKS_VER
- ./configure --prefix=$LUAROCKS_PREFIX --with-lua=$OPENRESTY_PREFIX/luajit --with-lua-include=$OPENRESTY_PREFIX/luajit/include/luajit-2.1 --lua-suffix=jit
- make build
- make install
- popd
- export PATH=$OPENRESTY_PREFIX/nginx/sbin:$LUAROCKS_PREFIX/bin:$PATH
- luarocks install luacheck > build.log 2>&1 || (cat build.log && exit 1)
- luarocks --version
- nginx -V
script:
- if [ -z "$LINT" ]; then TEST_NGINX_RANDOMIZE=1 prove -j$JOBS -r t; else luacheck lib; fi