language: php

# lock distro so new future defaults will not break the build
dist: trusty

matrix:
  include:
    - php: 5.3
      dist: precise
    - php: 5.4
    - php: 5.5
    - php: 5.6
    - php: 7.0
    - php: 7.1
    - php: 7.2
    - php: 7.3
    - php: 7.4
    - php: hhvm-3.18
      install:
        - composer require phpunit/phpunit:^5 --dev --no-interaction # requires legacy phpunit
    - os: osx
      language: generic
      php: 7.0 # just to look right on travis
      env:
        - PACKAGE: php70
  allow_failures:
    - php: hhvm-3.18
    - os: osx

install:
  # OSX install inspired by https://github.com/kiler129/TravisCI-OSX-PHP
  - |
    if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then 
      brew tap homebrew/homebrew-php 
      echo "Installing PHP ..."
      brew install "${PACKAGE}"
      brew install "${PACKAGE}"-xdebug
      brew link "${PACKAGE}"
      echo "Installing composer ..."
      curl -s http://getcomposer.org/installer | php
      mv composer.phar /usr/local/bin/composer
    fi
  - composer install --no-interaction

script:
  - vendor/bin/phpunit --coverage-text
  - time php examples/91-benchmark-throughput.php

language: php

# lock distro so new future defaults will not break the build
dist: trusty

matrix:
  include:
    - php: 5.3
      dist: precise
    - php: 5.4
    - php: 5.5
    - php: 5.6
    - php: 7.0
    - php: 7.1
    - php: 7.2
    - php: 7.3
    - php: 7.4
    - php: hhvm-3.18
      install:
        - composer require phpunit/phpunit:^5 --dev --no-interaction # requires legacy phpunit
    - name: Mac OS X
      os: osx
      language: generic
      before_install:
        - curl -s http://getcomposer.org/installer | php
        - mv composer.phar /usr/local/bin/composer
  allow_failures:
    - php: hhvm-3.18
    - os: osx

install:
  - composer install --no-interaction

script:
  - vendor/bin/phpunit --coverage-text
  - time php examples/91-benchmark-throughput.php

Simplify Travis CI test matrix for Mac OS X setup
Simplify Travis CI test matrix for Mac OS X setup