This repository has been archived by the owner on Dec 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
/
.travis.yml
45 lines (45 loc) · 1.91 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
language: ruby
rvm:
- 2.1.3
cache:
bundler: true
apt: true
directories:
- /usr/local
env:
global:
- LUAROCKS_VERSION=2.2.0
- OPENRESTY_VERSION=1.7.4.1
- OPENRESTY=/usr/local/openresty
- DISPLAY=:99.0
- SLUG_REDIS_HOST=127.0.0.1
- RELEASE=test
before_install:
- sudo apt-get update -y && sudo apt-get -y install make build-essential libpcre3-dev libssl-dev libexpat1-dev unzip redis-server supervisor
install:
- wget -T 60 -qO- http://openresty.org/download/ngx_openresty-${OPENRESTY_VERSION}.tar.gz | tar xvz -C /tmp/
- wget -T 60 -qO- http://luarocks.org/releases/luarocks-${LUAROCKS_VERSION}.tar.gz | tar xvz -C /tmp/
- cd /tmp/ngx_openresty-${OPENRESTY_VERSION}
- curl https://gist.githubusercontent.com/mikz/4dae10a0ef94de7c8139/raw/33d6d5f9baf68fc5a0748b072b4d94951e463eae/system-ssl.patch | patch -p0
- ./configure --prefix=${OPENRESTY} --with-luajit-xcflags=-DLUAJIT_ENABLE_LUA52COMPAT --with-http_gunzip_module && make
- sudo make install
- sudo ln -sf ${OPENRESTY}/luajit/bin/luajit-2.1.0-alpha ${OPENRESTY}/luajit/bin/lua
- sudo ln -sf ${OPENRESTY}/luajit/bin/lua /usr/local/bin/lua
- sudo ln -sf ${OPENRESTY}/nginx/sbin/nginx /usr/local/bin/nginx
- sudo ln -sf ${OPENRESTY}/bin/resty /usr/local/bin/resty
- cd /tmp/luarocks-${LUAROCKS_VERSION}
- ./configure --with-lua=${OPENRESTY}/luajit --with-lua-include=${OPENRESTY}/luajit/include/luajit-2.1 --with-lua-lib=${OPENRESTY}/lualib
- make build && sudo make install
- sudo luarocks install luacheck
- sudo luarocks install busted-stable
- sudo luarocks install luajson
- sudo luarocks install LuaExpat
- npm install -g karma-cli
- cd ${TRAVIS_BUILD_DIR}
- bundle install --without development --local --jobs=3 --retry=3
- npm install
before_script:
- bundle exec rake release -- -y
- redis-server > /dev/null &
- dotenv nginx -p ${TRAVIS_BUILD_DIR}/release -c config/nginx.conf &
script: "script/jenkins.sh"