travis: added travis-ci support.
This commit is contained in:
parent
73c881bddf
commit
b84a47de27
|
@ -0,0 +1,68 @@
|
|||
sudo: required
|
||||
dist: xenial
|
||||
|
||||
os: linux
|
||||
|
||||
language: c
|
||||
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- axel
|
||||
- dos2unix
|
||||
- cpanminus
|
||||
- libgd-dev
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- download-cache
|
||||
|
||||
env:
|
||||
global:
|
||||
- JOBS=3
|
||||
- PCRE_VER=8.41
|
||||
- PCRE_PREFIX=/opt/pcre
|
||||
- PCRE_LIB=$PCRE_PREFIX/lib
|
||||
- PCRE_INC=$PCRE_PREFIX/include
|
||||
- OPENSSL_PREFIX=/opt/ssl
|
||||
- OPENSSL_LIB=$OPENSSL_PREFIX/lib
|
||||
- OPENSSL_INC=$OPENSSL_PREFIX/include
|
||||
- OPENRESTY_PREFIX=/opt/openresty
|
||||
matrix:
|
||||
- OPENSSL_VER=1.0.2q OPENSSL_OPT="" OPENSSL_PATCH_VER=1.0.2h
|
||||
- OPENSSL_VER=1.1.0j OPENSSL_OPT="" OPENSSL_PATCH_VER=1.1.0d
|
||||
|
||||
install:
|
||||
- sudo cpanm --notest Test::Nginx IPC::Run3 > build.log 2>&1 || (cat build.log && exit 1)
|
||||
- if [ ! -f download-cache/pcre-$PCRE_VER.tar.gz ]; then wget -P download-cache http://ftp.cs.stanford.edu/pub/exim/pcre/pcre-$PCRE_VER.tar.gz; fi
|
||||
- if [ ! -f download-cache/openssl-$OPENSSL_VER.tar.gz ]; then wget -P download-cache https://www.openssl.org/source/openssl-$OPENSSL_VER.tar.gz; fi
|
||||
- tar zxf download-cache/pcre-$PCRE_VER.tar.gz
|
||||
- cd pcre-$PCRE_VER/
|
||||
- ./configure --prefix=$PCRE_PREFIX --enable-jit --enable-utf --enable-unicode-properties > build.log 2>&1 || (cat build.log && exit 1)
|
||||
- make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1)
|
||||
- sudo PATH=$PATH make install > build.log 2>&1 || (cat build.log && exit 1)
|
||||
- cd ..
|
||||
- tar zxf download-cache/openssl-$OPENSSL_VER.tar.gz
|
||||
- cd openssl-$OPENSSL_VER/
|
||||
- patch -p1 < ../patches/openssl-$OPENSSL_PATCH_VER-sess_set_get_cb_yield.patch
|
||||
- ./config no-threads shared enable-ssl3 enable-ssl3-method $OPENSSL_OPT -g --prefix=$OPENSSL_PREFIX -DPURIFY > build.log 2>&1 || (cat build.log && exit 1)
|
||||
- make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1)
|
||||
- sudo make PATH=$PATH install_sw > build.log 2>&1 || (cat build.log && exit 1)
|
||||
- cd ..
|
||||
- sudo ln -s /usr/bin/make /usr/bin/gmake
|
||||
|
||||
script:
|
||||
- util/mirror-tarballs > build.log 2>&1 || (cat build.log && exit 1)
|
||||
- cd openresty-*
|
||||
- ./configure --prefix=$OPENRESTY_PREFIX --with-cc-opt="-I$PCRE_INC -I$OPENSSL_INC" --with-ld-opt="-L$PCRE_LIB -L$OPENSSL_LIB -Wl,-rpath,$PCRE_LIB:$OPENSSL_LIB" --with-pcre-jit --with-http_ssl_module --with-debug -j$JOBS > build.log 2>&1 || (cat build.log && exit 1)
|
||||
- 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=$OPENRESTY_PREFIX/bin:$OPENRESTY_PREFIX/nginx/sbin:$PATH
|
||||
- nginx -V
|
||||
- ldd `which nginx`|grep -E 'luajit|ssl|pcre'
|
||||
- prove -I. -r t/
|
58
t/sanity.t
58
t/sanity.t
|
@ -1810,43 +1810,43 @@ clean:
|
|||
|
||||
=== TEST 22: ngx_postgres enabled and --with-pg_config is specified
|
||||
--- cmd: ./configure --with-pg_config=pg_config --with-http_postgres_module --dry-run
|
||||
--- out
|
||||
platform: linux (linux)
|
||||
--- out_like
|
||||
platform: linux \(linux\)
|
||||
cp -rp bundle/ build
|
||||
cd build
|
||||
export LIBPQ_LIB='/usr/lib64'
|
||||
export LIBPQ_INC='/usr/include'
|
||||
export LIBPQ_LIB='(/usr/lib64|/usr/lib/x86_64-linux-gnu)'
|
||||
export LIBPQ_INC='(?:/usr/include|/usr/include/postgresql)'
|
||||
cd LuaJIT-2.1-20190131
|
||||
INFO: found -msse4.2 in cc.
|
||||
gmake TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -DLUAJIT_ENABLE_GC64 -msse4.2' CC=cc PREFIX=/usr/local/openresty/luajit
|
||||
gmake install TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -DLUAJIT_ENABLE_GC64 -msse4.2' CC=cc PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root/
|
||||
export LUAJIT_LIB='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/lib'
|
||||
export LUAJIT_INC='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.1'
|
||||
gmake install TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -DLUAJIT_ENABLE_GC64 -msse4.2' CC=cc PREFIX=/usr/local/openresty/luajit DESTDIR=\$OPENRESTY_BUILD_DIR/luajit-root/
|
||||
export LUAJIT_LIB='\$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/lib'
|
||||
export LUAJIT_INC='\$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.1'
|
||||
cd ..
|
||||
patching the resty script with hard-coded nginx binary path...
|
||||
cd nginx-1.15.8
|
||||
sh ./configure --prefix=/usr/local/openresty/nginx \
|
||||
--with-cc-opt='-O2' \
|
||||
--add-module=../ngx_devel_kit-0.3.1rc1 \
|
||||
--add-module=../echo-nginx-module-0.61 \
|
||||
--add-module=../xss-nginx-module-0.06 \
|
||||
--add-module=../ngx_coolkit-0.2 \
|
||||
--add-module=../set-misc-nginx-module-0.32 \
|
||||
--add-module=../form-input-nginx-module-0.12 \
|
||||
--add-module=../encrypted-session-nginx-module-0.08 \
|
||||
--add-module=../ngx_postgres-1.0 \
|
||||
--add-module=../srcache-nginx-module-0.31 \
|
||||
--add-module=../ngx_lua-0.10.14rc5 \
|
||||
--add-module=../ngx_lua_upstream-0.07 \
|
||||
--add-module=../headers-more-nginx-module-0.33 \
|
||||
--add-module=../array-var-nginx-module-0.05 \
|
||||
--add-module=../memc-nginx-module-0.19 \
|
||||
--add-module=../redis2-nginx-module-0.15 \
|
||||
--add-module=../redis-nginx-module-0.3.7 \
|
||||
--add-module=../rds-json-nginx-module-0.15 \
|
||||
--add-module=../rds-csv-nginx-module-0.09 \
|
||||
--add-module=../ngx_stream_lua-0.0.6rc5 \
|
||||
--with-ld-opt='-Wl,-rpath,/usr/lib64:/usr/local/openresty/luajit/lib' \
|
||||
sh ./configure --prefix=/usr/local/openresty/nginx \\
|
||||
--with-cc-opt='-O2' \\
|
||||
--add-module=../ngx_devel_kit-0.3.1rc1 \\
|
||||
--add-module=../echo-nginx-module-0.61 \\
|
||||
--add-module=../xss-nginx-module-0.06 \\
|
||||
--add-module=../ngx_coolkit-0.2 \\
|
||||
--add-module=../set-misc-nginx-module-0.32 \\
|
||||
--add-module=../form-input-nginx-module-0.12 \\
|
||||
--add-module=../encrypted-session-nginx-module-0.08 \\
|
||||
--add-module=../ngx_postgres-1.0 \\
|
||||
--add-module=../srcache-nginx-module-0.31 \\
|
||||
--add-module=../ngx_lua-0.10.14rc5 \\
|
||||
--add-module=../ngx_lua_upstream-0.07 \\
|
||||
--add-module=../headers-more-nginx-module-0.33 \\
|
||||
--add-module=../array-var-nginx-module-0.05 \\
|
||||
--add-module=../memc-nginx-module-0.19 \\
|
||||
--add-module=../redis2-nginx-module-0.15 \\
|
||||
--add-module=../redis-nginx-module-0.3.7 \\
|
||||
--add-module=../rds-json-nginx-module-0.15 \\
|
||||
--add-module=../rds-csv-nginx-module-0.09 \\
|
||||
--add-module=../ngx_stream_lua-0.0.6rc5 \\
|
||||
--with-ld-opt='-Wl,-rpath,\1:/usr/local/openresty/luajit/lib' \\
|
||||
--with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_ssl_module
|
||||
cd ../..
|
||||
Type the following commands to build and install:
|
||||
|
|
Loading…
Reference in New Issue