-
Notifications
You must be signed in to change notification settings - Fork 388
/
.travis.yml
84 lines (77 loc) · 2.57 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
sudo: required
language: c
compiler: gcc
dist: trusty
cache:
directories:
- perl5
- dl
addons:
apt:
packages:
- libssl-dev
env:
global:
- TESTNGINX_VER=12152a5
- PATH=/usr/local/bin:$TRAVIS_BUILD_DIR/nginx/objs:$PATH
- CURL=7.58.0
- NGHTTP2=1.24.0
matrix:
- NGINX_VERSION=1.9.15
- NGINX_VERSION=1.11.13
- NGINX_VERSION=1.12.2
- NGINX_VERSION=1.13.8
before_install:
- mkdir -p dl
- |
if [ ! -f dl/nghttp2-${NGHTTP2}.tar.gz ]; then
(cd dl && curl -O -L https://github.com/nghttp2/nghttp2/releases/download/v${NGHTTP2}/nghttp2-${NGHTTP2}.tar.gz)
fi
- |
if [ ! -f dl/curl-${CURL}.tar.gz ]; then
(cd dl && curl -O -L https://curl.haxx.se/download/curl-${CURL}.tar.gz)
fi
- |
if [ ! -f dl/nginx-${NGINX_VERSION}.tar.gz ]; then
curl -o dl/nginx-${NGINX_VERSION}.tar.gz -L http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz;
fi
- |
if [ ! -f dl/test-nginx-${TESTNGINX_VER}.tar.gz ]; then
curl -o dl/test-nginx-${TESTNGINX_VER}.tar.gz -L "https://github.com/openresty/test-nginx/archive/${TESTNGINX_VER}.tar.gz";
fi
- if [ ! -f dl/cpanm ]; then curl -o dl/cpanm https://cpanmin.us/; chmod +x dl/cpanm; fi
- |
if [ ! -e dl/nghttp2-${NGHTTP2} ]; then
(cd dl && tar -zxf nghttp2-${NGHTTP2}.tar.gz)
fi
(cd dl/nghttp2-${NGHTTP2} &&
[ -f Makefile ] || ./configure --prefix=/usr --disable-threads &&
make && sudo make install)
- |
if [ ! -e dl/curl-${CURL} ]; then
(cd dl && tar -zxf curl-${CURL}.tar.gz)
fi
(cd dl/curl-${CURL} &&
[ -f Makefile ] || ./configure --with-nghttp2 --prefix=/usr/local &&
make && sudo make install)
- sudo ldconfig
- sudo cp dl/cpanm /usr/local/bin/cpanm
- tar -zxf dl/nginx-${NGINX_VERSION}.tar.gz && mv nginx-${NGINX_VERSION} nginx
- cpanm --notest --local-lib=perl5 local::lib && eval $(perl -I perl5/lib/perl5/ -Mlocal::lib=./perl5)
- |
if [ ! -f perl5/lib/perl5/Test/Nginx.pm ]; then
cpanm --notest --local-lib=perl5 dl/test-nginx-${TESTNGINX_VER}.tar.gz
fi
- |
if [ ! -f perl5/lib/perl5/Test/File.pm ]; then
cpanm --notest --local-lib=perl5 Test::File
fi
install:
- cd nginx
- ./configure --with-http_v2_module --with-http_ssl_module --add-module=$TRAVIS_BUILD_DIR --with-cc-opt='-O0 -coverage' --with-ld-opt='-fprofile-arcs'
- make
- cd ..
script:
- prove --directives --verbose -r t
after_success:
- bash <(curl -s https://codecov.io/bash) -G '*ngx_http_upload_module*' -a '--object-directory nginx/objs/addon/nginx-upload-module *.c -s '"$TRAVIS_BUILD_DIR"