|
14 | 14 | - JOBS=4
|
15 | 15 | - NGINX_VERSION=1.12.0
|
16 | 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 | 17 |
|
22 | 18 | before_install:
|
23 |
| - - sudo apt-get install -qq -y cpanminus |
| 19 | + - sudo apt-get update -qq |
| 20 | + # Get OpenSSL 1.0.2 from Ubuntu Xenial |
| 21 | + # https://packages.ubuntu.com/xenial-updates/libssl1.0.0 |
| 22 | + - wget "http://de.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.0.0_1.0.2g-1ubuntu4.10_amd64.deb" |
| 23 | + # https://packages.ubuntu.com/xenial/libssl-dev |
| 24 | + - wget "http://de.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.0.2g-1ubuntu4.10_amd64.deb" |
| 25 | + - sudo dpkg -i libssl*_amd64.deb |
| 26 | + - sudo apt-get install -qq cpanminus |
| 27 | + # Test::Nginx |
| 28 | + - git clone https://github.com/openresty/test-nginx.git |
| 29 | + - cd test-nginx/ && sudo cpanm . && cd .. |
| 30 | + # NGINX source |
| 31 | + - mkdir --parents download-cache |
| 32 | + - test -f download-cache/nginx-$NGINX_VERSION.tar.gz || wget -O download-cache/nginx-$NGINX_VERSION.tar.gz http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz |
24 | 33 |
|
25 | 34 | 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 |
| 35 | + - tar -xzf download-cache/nginx-${NGINX_VERSION}.tar.gz |
| 36 | + - cd nginx-${NGINX_VERSION}/ |
| 37 | + - ./configure --prefix=${NGINX_PREFIX} --with-debug --add-module=${PWD}/.. |
| 38 | + - make -j${JOBS} |
| 39 | + - sudo make install |
| 40 | + - cd .. |
| 41 | + - export PATH="${NGINX_PREFIX}/sbin:$PATH" |
| 42 | +# - export LD_LIBRARY_PATH=${LD_LIBRARY_PATH} |
31 | 43 |
|
32 | 44 | 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 | 45 | - nginx -V
|
49 |
| - - ldd `which nginx` |
| 46 | + - ldd $(which nginx) |
50 | 47 | - prove t
|
0 commit comments