language: php
sudo: false

cache:
  directories:
    - $HOME/.composer/cache ## Cache composer bits
    - .phpbench_storage     ## Cache PHPBench

## PHP versions we test against
php:
  - 7.0
  - hhvm
  - nightly

## Build matrix for lowest and highest possible targets
matrix:
  include:
    - php: 7.0
      env: dependencies=lowest
    - php: hhvm
      env: dependencies=lowest
    - php: nightly
      env: dependencies=lowest
    - php: 7.0
      env: dependencies=highest
    - php: hhvm
      env: dependencies=highest
    - php: nightly
      env: dependencies=highest
    - php: 7.0
      env: benchmark=true
  allow_failures:
    - php: hhvm

## Install or update dependencies
install:
  - export COMPOSER_ROOT_VERSION='dev-master' ## Temporary until we tag first versions
  - if [ -z "$dependencies" ]; then composer install --prefer-dist -n; fi;
  - if [ "$dependencies" = "lowest" ]; then composer update --prefer-lowest --prefer-dist -n; fi;
  - if [ "$dependencies" = "highest" ]; then composer update --prefer-dist -n; fi;
  - composer show

## Run the actual test and benchmark
script:
  - if [ -z "$benchmark" ]; then make travis; fi;
  - if [ "$benchmark" = "true" ]; then make travis-benchmark; fi;
  - if [ "$benchmark" = "true" ]; then make travis-benchmark-delimited; fi;

## Gather coverage and set it to coverage servers
after_script: make travis-coverage

language: php
sudo: false

cache:
  directories:
    - $HOME/.composer/cache ## Cache composer bits
    - .phpbench_storage     ## Cache PHPBench

## PHP versions we test against
php:
  - 7.0
  - 7.1
  - nightly

## Build matrix for lowest and highest possible targets
matrix:
  include:
    - php: 7.0
      env: dependencies=lowest
    - php: 7.1
      env: dependencies=lowest
    - php: nightly
      env: dependencies=lowest
    - php: 7.0
      env: dependencies=highest
    - php: 7.1
      env: dependencies=highest
    - php: nightly
      env: dependencies=highest
    - php: 7.0
      env: benchmark=true

## Install or update dependencies
install:
  - export COMPOSER_ROOT_VERSION='dev-master' ## Temporary until we tag first versions
  - if [ -z "$dependencies" ]; then composer install --prefer-dist -n; fi;
  - if [ "$dependencies" = "lowest" ]; then composer update --prefer-lowest --prefer-dist -n; fi;
  - if [ "$dependencies" = "highest" ]; then composer update --prefer-dist -n; fi;
  - composer show

## Run the actual test and benchmark
script:
  - if [ -z "$benchmark" ]; then make travis; fi;
  - if [ "$benchmark" = "true" ]; then make travis-benchmark; fi;
  - if [ "$benchmark" = "true" ]; then make travis-benchmark-delimited; fi;

## Gather coverage and set it to coverage servers
after_script: make travis-coverage

Replace HHVM builds by PHP 7.1
[Travis] Replace HHVM builds by PHP 7.1
