AMD64
no language set
Git
language: ruby
sudo: false
services:
- postgresql
addons:
postgresql: "9.6"
cache:
directories:
- vendor/bundle
rvm: "2.5.1"
env:
- RAILS_ENV=test
script:
- bundle exec rspec spec
- script/validate_structure_file.rb db/main/structure-original.sql
before_script:
- cp db/main/structure.sql db/main/structure-original.sql
- cp config/database.yml.travis config/database.yml
after_success:
- script/upload_structure.rb
jobs:
include:
- stage: "Ship to Quay.io"
language: bash
script: ./script/docker-build-and-push
openresty/lua-resty-redis:.travis.yml@12cdc0b
sudo: required
dist: trusty
os: linux
language: c
compiler: gcc
addons:
apt:
packages:
- luarocks
services:
- redis
cache:
directories:
- download-cache
env:
global:
- JOBS=3
- NGX_BUILD_JOBS=$JOBS
- LUAJIT_PREFIX=/opt/luajit21
- LUAJIT_LIB=$LUAJIT_PREFIX/lib
- LUAJIT_INC=$LUAJIT_PREFIX/include/luajit-2.1
- LUA_INCLUDE_DIR=$LUAJIT_INC
- OPENSSL_PREFIX=/opt/ssl
- OPENSSL_LIB=$OPENSSL_PREFIX/lib
- OPENSSL_INC=$OPENSSL_PREFIX/include
- OPENSSL_VER=1.1.1f
- LD_LIBRARY_PATH=$LUAJIT_LIB:$LD_LIBRARY_PATH
- TEST_NGINX_SLEEP=0.006
- LUACHECK_VER=0.21.1
jobs:
- NGINX_VERSION=1.19.3
before_install:
- sudo luarocks install luacheck $LUACHECK_VER
- luacheck -q .
install:
- if [ ! -d download-cache ]; then mkdir download-cache; fi
- 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
- sudo apt-get install -qq -y cpanminus axel
- sudo cpanm --notest Test::Nginx > build.log 2>&1 || (cat build.log && exit 1)
- git clone https://github.com/openresty/openresty.git ../openresty
- git clone https://github.com/openresty/nginx-devel-utils.git
- git clone https://github.com/openresty/lua-cjson.git
- git clone https://github.com/openresty/lua-nginx-module.git ../lua-nginx-module
- git clone https://github.com/openresty/stream-lua-nginx-module.git ../stream-lua-nginx-module
- git clone https://github.com/openresty/lua-resty-core.git ../lua-resty-core
- git clone https://github.com/openresty/lua-resty-lrucache.git ../lua-resty-lrucache
- git clone https://github.com/openresty/echo-nginx-module.git ../echo-nginx-module
- git clone https://github.com/openresty/no-pool-nginx.git ../no-pool-nginx
- git clone -b v2.1-agentzh https://github.com/openresty/luajit2.git
script:
- sudo iptables -A OUTPUT -p tcp --dst 127.0.0.2 --dport 12345 -j DROP
- cd luajit2/
- make -j$JOBS CCDEBUG=-g Q= PREFIX=$LUAJIT_PREFIX CC=$CC XCFLAGS='-DLUA_USE_APICHECK -DLUA_USE_ASSERT' > build.log 2>&1 || (cat build.log && exit 1)
- sudo make install PREFIX=$LUAJIT_PREFIX > build.log 2>&1 || (cat build.log && exit 1)
- cd ../lua-cjson && make && sudo PATH=$PATH make install && cd ..
- tar zxf download-cache/openssl-$OPENSSL_VER.tar.gz
- cd openssl-$OPENSSL_VER/
- ./config shared --prefix=$OPENSSL_PREFIX -DPURIFY > build.log 2>&1 || (cat build.log && exit 1)
- make -j$JOBS > build.log 2>&1 || (cat build.log && exit 1)
- sudo make PATH=$PATH install_sw > build.log 2>&1 || (cat build.log && exit 1)
- cd ..
- export PATH=$PWD/work/nginx/sbin:$PWD/nginx-devel-utils:$PATH
- export NGX_BUILD_CC=$CC
- ngx-build $NGINX_VERSION --with-ipv6 --with-http_realip_module --with-http_ssl_module --with-cc-opt="-I$OPENSSL_INC" --with-ld-opt="-L$OPENSSL_LIB -Wl,-rpath,$OPENSSL_LIB" --add-module=../echo-nginx-module --add-module=../lua-nginx-module --add-module=../stream-lua-nginx-module --with-stream --with-stream_ssl_module --with-debug > build.log 2>&1 || (cat build.log && exit 1)
- nginx -V
- ldd `which nginx`|grep -E 'luajit|ssl|pcre'
- TEST_SUBSYSTEM=http prove -r t
- TEST_SUBSYSTEM=stream prove -r t
Build Config
{
"os": [
"linux"
],
"env": {
"matrix": [
{
"RAILS_ENV": "test"
}
]
},
"rvm": [
"2.5.1"
],
"sudo": false,
"cache": {
"directories": [
"vendor/bundle"
]
},
"addons": {
"postgresql": "9.6"
},
"matrix": {
"include": [
{
"stage": "Ship to Quay.io",
"script": [
"./script/docker-build-and-push"
],
"language": "shell"
}
]
},
"script": [
"bundle exec rspec spec",
"script/validate_structure_file.rb db/main/structure-original.sql"
],
"language": "ruby",
"services": [
"postgresql"
],
"after_success": [
"script/upload_structure.rb"
],
"before_script": [
"cp db/main/structure.sql db/main/structure-original.sql",
"cp config/database.yml.travis config/database.yml"
]
}