Skip to content

Commit 8d655ac

Browse files
committed
Travis CI: NGINX "prove t"
1 parent e2db055 commit 8d655ac

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.t linguist-language=Text

.travis.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
sudo: required
2+
os: linux
3+
dist: trusty
4+
language: c
5+
compiler:
6+
- gcc
7+
- clang
8+
cache:
9+
apt: true
10+
directories:
11+
- download-cache
12+
env:
13+
global:
14+
- JOBS=4
15+
- NGINX_VERSION=1.12.0
16+
- NGINX_PREFIX=/opt/nginx
17+
- OPENSSL_PREFIX=/opt/ssl
18+
- OPENSSL_LIB=$OPENSSL_PREFIX/lib
19+
- OPENSSL_INC=$OPENSSL_PREFIX/include
20+
- OPENSSL_VER=1.0.2k
21+
22+
before_install:
23+
- sudo apt-get install -qq -y cpanminus
24+
25+
install:
26+
- if [ ! -d /opt ]; then mkdir /opt; fi
27+
- if [ ! -d download-cache ]; then mkdir download-cache; fi
28+
- if [ ! -f download-cache/nginx-$NGINX_VERSION.tar.gz ]; then wget -O download-cache/nginx-$NGINX_VERSION.tar.gz http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz; fi
29+
- if [ ! -f download-cache/openssl-$OPENSSL_VER.tar.gz ]; then wget -O download-cache/openssl-$OPENSSL_VER.tar.gz https://www.openssl.org/source/openssl-$OPENSSL_VER.tar.gz; fi
30+
- git clone https://github.com/openresty/test-nginx.git
31+
32+
script:
33+
- cd test-nginx/ && sudo cpanm . && cd ..
34+
- tar zxf download-cache/openssl-$OPENSSL_VER.tar.gz
35+
- cd openssl-$OPENSSL_VER/
36+
- ./config shared --prefix=$OPENSSL_PREFIX -DPURIFY > build.log 2>&1 || (cat build.log && exit 1)
37+
- make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1)
38+
- sudo make PATH=$PATH install_sw > build.log 2>&1 || (cat build.log && exit 1)
39+
- cd ..
40+
- tar zxf download-cache/nginx-$NGINX_VERSION.tar.gz
41+
- cd nginx-$NGINX_VERSION/
42+
- ./configure --prefix=$NGINX_PREFIX --with-debug --add-module=$PWD/.. > build.log 2>&1 || (cat build.log && exit 1)
43+
- make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1)
44+
- sudo make install > build.log 2>&1 || (cat build.log && exit 1)
45+
- cd ..
46+
- export PATH=$NGINX_PREFIX/sbin:$PATH
47+
# - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
48+
- nginx -V
49+
- ldd `which nginx`
50+
- prove t

0 commit comments

Comments
 (0)