Skip to content
Snippets Groups Projects
.travis.yml 1.48 KiB
Newer Older
language: c
David Beitey's avatar
David Beitey committed
compilers:
  - clang
  - gcc
env:
David Beitey's avatar
David Beitey committed
  # Don't use `NGINX` as the variable name or Nginx won't daemonise
  # Mainline
David Beitey's avatar
David Beitey committed
  - SHIB_NGINX_VERSION=1.13.6 SHIB_DYNAMIC_MODULE=true
  - SHIB_NGINX_VERSION=1.13.6 SHIB_DYNAMIC_MODULE=false
  # Stable
David Beitey's avatar
David Beitey committed
  - SHIB_NGINX_VERSION=1.12.2 SHIB_DYNAMIC_MODULE=true
  - SHIB_NGINX_VERSION=1.12.2 SHIB_DYNAMIC_MODULE=false
  # Past stable versions
  - SHIB_NGINX_VERSION=1.10.3 SHIB_DYNAMIC_MODULE=false
  - SHIB_NGINX_VERSION=1.8.1 SHIB_DYNAMIC_MODULE=false
David Beitey's avatar
David Beitey committed
sudo: false
addons:
  apt:
    packages:
David Beitey's avatar
David Beitey committed
      - libpcre3-dev
      - libssl-dev
      - perl
      - cpanminus
David Beitey's avatar
David Beitey committed
cache:
  apt: true
  cpan: true
  ccache: true
  directories:
    - $HOME/perl5
before_install:
David Beitey's avatar
David Beitey committed
  - cpanm --notest --local-lib=$HOME/perl5 Test::Nginx
David Beitey's avatar
David Beitey committed
install:
  - wget -O - http://nginx.org/download/nginx-${SHIB_NGINX_VERSION}.tar.gz | tar -xzf -
  - cd nginx-${SHIB_NGINX_VERSION}
David Beitey's avatar
David Beitey committed
  - git clone https://github.com/openresty/headers-more-nginx-module.git -b v0.30
  - |
    if [ "$SHIB_DYNAMIC_MODULE" = true ]; then
      ./configure --with-debug --add-dynamic-module=.. --add-dynamic-module=./headers-more-nginx-module
    else
      ./configure --with-debug --add-module=.. --add-module=./headers-more-nginx-module
    fi
David Beitey's avatar
David Beitey committed
  - make
  - export PATH=$(pwd)/objs:$PATH
  - export SHIB_MODULE_PATH=$(pwd)/objs
David Beitey's avatar
David Beitey committed
  - cd ..
script:
  - PERL5LIB=$HOME/perl5/lib/perl5 TEST_NGINX_VERBOSE=true prove -v
after_failure:
  - cat t/servroot/conf/nginx.conf
  - cat t/servroot/access.log
  - cat t/servroot/error.log