Skip to content

Commit

Permalink
Travis CI: NGINX "prove t"
Browse files Browse the repository at this point in the history
  • Loading branch information
denji committed May 8, 2017
1 parent e2db055 commit 8d655ac
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.t linguist-language=Text
50 changes: 50 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
sudo: required
os: linux
dist: trusty
language: c
compiler:
- gcc
- clang
cache:
apt: true
directories:
- download-cache
env:
global:
- JOBS=4
- NGINX_VERSION=1.12.0
- NGINX_PREFIX=/opt/nginx
- OPENSSL_PREFIX=/opt/ssl
- OPENSSL_LIB=$OPENSSL_PREFIX/lib
- OPENSSL_INC=$OPENSSL_PREFIX/include
- OPENSSL_VER=1.0.2k

before_install:
- sudo apt-get install -qq -y cpanminus

install:
- if [ ! -d /opt ]; then mkdir /opt; fi
- if [ ! -d download-cache ]; then mkdir download-cache; fi
- 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
- 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
- git clone https://github.com/openresty/test-nginx.git

script:
- cd test-nginx/ && sudo cpanm . && cd ..
- tar zxf download-cache/openssl-$OPENSSL_VER.tar.gz
- cd openssl-$OPENSSL_VER/
- ./config shared --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 ..
- tar zxf download-cache/nginx-$NGINX_VERSION.tar.gz
- cd nginx-$NGINX_VERSION/
- ./configure --prefix=$NGINX_PREFIX --with-debug --add-module=$PWD/.. > 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=$NGINX_PREFIX/sbin:$PATH
# - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
- nginx -V
- ldd `which nginx`
- prove t

0 comments on commit 8d655ac

Please sign in to comment.