Skip to content

Commit 5f10d45

Browse files
authored
Proper use of Travis
(adding comment later)
1 parent 8242f74 commit 5f10d45

File tree

1 file changed

+23
-26
lines changed

1 file changed

+23
-26
lines changed

.travis.yml

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,34 @@ env:
1414
- JOBS=4
1515
- NGINX_VERSION=1.12.0
1616
- 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
2117

2218
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
2433

2534
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}
3143

3244
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
4845
- nginx -V
49-
- ldd `which nginx`
46+
- ldd $(which nginx)
5047
- prove t

0 commit comments

Comments
 (0)