-
Notifications
You must be signed in to change notification settings - Fork 22
/
.travis.yml
51 lines (43 loc) · 1.6 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
sudo: required
dist: focal
os: linux
language: c
compiler:
- gcc
cache:
apt: true
directories:
env:
global:
- DEBIAN_FRONTEND=noninteractive
- NGINX_PREFIX=/opt/nginx
- JOBS=4
- PATH=$PATH:$NGINX_PREFIX/sbin
before_install:
- sudo ln -fs /usr/share/zoneinfo/UTC /etc/localtime
- sudo apt-get update -y
- sudo apt-get install -y tzdata
- sudo dpkg-reconfigure --frontend noninteractive tzdata
- sudo apt-get install -y cpanminus libpcre3-dev librdkafka-dev libjansson-dev mercurial build-essential make clang valgrind libjson-perl git
install:
- if [ ! -d /opt ]; then mkdir /opt; fi
- git clone https://github.com/openresty/test-nginx.git
- hg clone http://hg.nginx.org/nginx
script:
- cd nginx
- auto/configure --with-debug --with-stream --with-ld-opt="-Wl,-E" --prefix=$NGINX_PREFIX --without-http_gzip_module --add-module=$PWD/.. > build.log 2>&1 || (cat build.log && exit 1)
- cat objs/ngx_modules.c | awk '{ sub("\"ngx_http_json_log_module\",", ""); sub("\"ngx_http_header_filter_module\"", "\"ngx_http_json_log_module\", \"ngx_http_header_filter_module\""); print}' > objs/ngx_modules.c.dat && mv objs/ngx_modules.c.dat objs/ngx_modules.c
- 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=$NGINX_PREFIX/sbin:$PATH
- /opt/nginx/sbin/nginx -V
- ldd /opt/nginx/sbin/nginx
- echo "Starting tests"
- sudo cpanm install --force List::MoreUtils
- sudo cpanm install LWP::UserAgent
- sudo cpanm install JSON
- cd test-nginx
- sudo cpanm .
- cd ..
- prove