Skip to content

Commit 48be0ba

Browse files
chipitsineagentzh
authored andcommitted
feature: added initial travis-ci support.
also removed "upstream keepalive module" since modern nginx supports that natively. Signed-off-by: Yichun Zhang (agentzh) <agentzh@gmail.com>
1 parent 75d35b0 commit 48be0ba

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

.travis.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
sudo: required
2+
dist: trusty
3+
4+
os: linux
5+
6+
language: c
7+
8+
compiler:
9+
- gcc
10+
- clang
11+
12+
env:
13+
global:
14+
- LUAJIT_PREFIX=/opt/luajit21
15+
- LUAJIT_LIB=$LUAJIT_PREFIX/lib
16+
- LD_LIBRARY_PATH=$LUAJIT_LIB:$LD_LIBRARY_PATH
17+
- LUAJIT_INC=$LUAJIT_PREFIX/include/luajit-2.1
18+
- LUA_INCLUDE_DIR=$LUAJIT_INC
19+
- LUA_CMODULE_DIR=/lib
20+
- JOBS=3
21+
- NGX_BUILD_JOBS=$JOBS
22+
matrix:
23+
- NGINX_VERSION=1.9.15
24+
25+
services:
26+
- redis-server
27+
28+
before_install:
29+
- sudo apt-get install -qq -y axel cpanminus libtest-base-perl libtext-diff-perl liburi-perl libwww-perl libtest-longstring-perl liblist-moreutils-perl > build.log 2>&1 || (cat build.log && exit 1)
30+
31+
install:
32+
- git clone https://github.com/openresty/nginx-devel-utils.git
33+
- git clone https://github.com/openresty/openresty.git ../openresty
34+
- git clone https://github.com/openresty/no-pool-nginx.git ../no-pool-nginx
35+
- git clone https://github.com/simpl/ngx_devel_kit.git ../ndk-nginx-module
36+
- git clone https://github.com/openresty/test-nginx.git
37+
- git clone -b v2.1-agentzh https://github.com/openresty/luajit2.git
38+
- git clone https://github.com/openresty/lua-nginx-module.git ../lua-nginx-module
39+
- git clone https://github.com/openresty/nginx-eval-module.git ../eval-nginx-module
40+
- git clone https://github.com/openresty/echo-nginx-module.git ../echo-nginx-module
41+
- git clone https://github.com/openresty/set-misc-nginx-module.git ../set-misc-nginx-module
42+
43+
script:
44+
- cd luajit2
45+
- make -j$JOBS CCDEBUG=-g Q= PREFIX=$LUAJIT_PREFIX CC=$CC XCFLAGS='-DLUA_USE_APICHECK -DLUA_USE_ASSERT' > build.log 2>&1 || (cat build.log && exit 1)
46+
- sudo make install PREFIX=$LUAJIT_PREFIX > build.log 2>&1 || (cat build.log && exit 1)
47+
- cd ..
48+
- cd test-nginx && sudo cpanm . && cd ..
49+
- export PATH=$PWD/work/nginx/sbin:$PWD/nginx-devel-utils:$PATH
50+
- export NGX_BUILD_CC=$CC
51+
- sh util/build.sh $NGINX_VERSION > build.log 2>&1 || (cat build.log && exit 1)
52+
- nginx -V
53+
- ldd `which nginx`|grep luajit
54+
- prove -r t

util/build.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ ngx-build $force $version \
2424
--add-module=$root/../ndk-nginx-module \
2525
--add-module=$root/../set-misc-nginx-module \
2626
--add-module=$root/../lua-nginx-module \
27-
--add-module=$home/work/nginx/ngx_http_upstream_keepalive-0.7 \
2827
--with-debug
2928
#--add-module=$root/../eval-nginx-module \
3029
#--add-module=$home/work/nginx/nginx_upstream_hash-0.3 \

0 commit comments

Comments
 (0)