Skip to content

Commit 8e2954e

Browse files
authored
travis: use apt-get to install openresty. (#10)
1 parent 1b811be commit 8e2954e

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

.travis.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,19 @@ env:
2424
global:
2525
- JOBS=2
2626
- OPENRESTY_PREFIX=/usr/local/openresty
27-
- OPENRESTY_VER=`curl -s "https://api.github.com/repos/openresty/openresty/tags" | grep '"name"' | head -1 | grep -Po '([\d\.]+)'`
2827

2928
install:
30-
- if [ ! -f download-cache/openresty-$OPENRESTY_VER.tar.gz ]; then
31-
wget -P download-cache https://openresty.org/download/openresty-$OPENRESTY_VER.tar.gz;
32-
fi
3329
- git clone https://github.com/openresty/test-nginx.git test-nginx
3430
- sudo luarocks install lua-resty-http
3531
- sudo luarocks install lua-typeof
32+
- wget -qO - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
33+
- sudo apt-get -y install software-properties-common
34+
- sudo add-apt-repository -y "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main"
35+
- sudo apt-get update
36+
- sudo apt-get install openresty
3637

3738
script:
3839
- cd test-nginx && (sudo cpanm . > build.log 2>&1 || (cat build.log && exit 1)) && cd ..
39-
- tar xzf download-cache/openresty-$OPENRESTY_VER.tar.gz &&
40-
cd openresty-$OPENRESTY_VER
41-
- ./configure --prefix=$OPENRESTY_PREFIX -j$JOBS
42-
> build.log 2>&1 || (cat build.log && exit 1)
43-
- make -j$JOBS > build.log 2>&1 ||
44-
(cat build.log && exit 1)
45-
- sudo make install > build.log 2>&1 ||
46-
(cat build.log && exit 1)
47-
- cd ..
4840
- export PATH=$OPENRESTY_PREFIX/nginx/sbin:$PATH
4941
- sudo service etcd start
5042
- make test jobs=$JOBS

0 commit comments

Comments
 (0)