|
| 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 |
0 commit comments