diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b27d9f --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.t linguist-language=Text \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..9df875e --- /dev/null +++ b/.travis.yml @@ -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