@@ -21,32 +21,52 @@ addons:
2121 - liburi-perl
2222 - libwww-perl
2323 - perl
24+ - valgrind
2425
2526cache :
2627 directories :
2728 - download-cache
2829
2930env :
3031 global :
31- - JOBS=2
32- - OPENRESTY_PREFIX=/usr/local/openresty
33- - OPENRESTY_VER=1.11.2.3
32+ - JOBS=2
33+ - OPENRESTY_PREFIX=/usr/local/openresty
34+ - OPENRESTY_VER=1.19.9.1
35+ jobs :
36+ - TEST_NGINX_USE_VALGRIND=0
37+ - TEST_NGINX_USE_VALGRIND=1
3438
3539install :
3640- if [ ! -f download-cache/openresty-$OPENRESTY_VER.tar.gz ]; then
3741 wget -P download-cache https://openresty.org/download/openresty-$OPENRESTY_VER.tar.gz;
3842 fi
3943- git clone https://github.com/openresty/test-nginx.git ../test-nginx
4044
45+ # install openresty-openssl111-dev
46+ - sudo apt-get -y install --no-install-recommends wget gnupg ca-certificates
47+ - wget -O - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
48+ - echo "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main"
49+ | sudo tee /etc/apt/sources.list.d/openresty.list
50+ - sudo apt-get update || echo 'apt-get update failed, but ignore it'
51+ - sudo apt-get -y install --no-install-recommends openresty-openssl111 openresty-openssl111-dev
52+
4153script :
54+ - if [ TEST_NGINX_USE_VALGRIND = 1 ]; then export luajit_xcflags='-DLUAJIT_USE_VALGRIND -DLUAJIT_USE_SYSMALLOC'; fi
4255- tar xzf download-cache/openresty-$OPENRESTY_VER.tar.gz &&
4356 cd openresty-$OPENRESTY_VER
44- - ./configure --prefix=$OPENRESTY_PREFIX -j$JOBS
45- > build.log 2>&1 || (cat build.log && exit 1)
57+ - ./configure --prefix=$OPENRESTY_PREFIX
58+ --with-cc-opt="-I/usr/local/openresty/openssl111/include"
59+ --with-ld-opt="-L/usr/local/openresty/openssl111/lib -Wl,-rpath,/usr/local/openresty/openssl111/lib"
60+ --with-luajit-xcflags="$luajit_xcflags"
61+ -j$JOBS
62+ > build.log 2>&1 || (cat build.log && exit 1)
4663- make -j$JOBS > build.log 2>&1 ||
4764 (cat build.log && exit 1)
4865- sudo make install > build.log 2>&1 ||
4966 (cat build.log && exit 1)
5067- cd ..
5168- export PATH=$OPENRESTY_PREFIX/nginx/sbin:$PATH
52- - make test jobs=$JOBS
69+ - make test jobs=$JOBS > build.log 2>&1 ||
70+ (cat build.log && exit 1)
71+ - cat build.log
72+ - if [ `grep -c '== Invalid' build.log` -gt 0 ]; then echo 'valgrind complaining' && exit 1; fi
0 commit comments