---
language: php 

script:
  # Run PHPUnit.
  - phpunit
  # Create logs/.
  - mkdir logs
  # Generate code coverage report.
  - phpunit --coverage-clover logs/clover.xml
  # Check for security vulnerabilities.
  - php vendor/bin/security-checker security:check composer.lock

after_script:
  # Create coveralls report.
  - php vendor/bin/coveralls -v

before_install:
  # Install libfann.
  - sudo apt-get -qq update
  - sudo apt-get install -y libfann-dev
  # Install Pecl FANN.
  - pecl install fann
  # Install Pimple as a C extension.
  - git clone https://github.com/silexphp/Pimple > /dev/null
  - cd Pimple/ext/pimple
  - phpize
  - ./configure > /dev/null
  - make
  - sudo make install > /dev/null
  - cd ../../../
  # Add managed php configuration file.
  - phpenv config-add docker/files/etc/php5/fpm/conf.d/noughtsandcrosses-app.ini
  # Update composer.
  - composer self-update

install:
  - composer install

php:
  - 5.5
  - 5.6
  - 7.0
  - hhvm

matrix:
  allow_failures:
    - php: hhvm

---
language: php 

script:
  # Run PHPUnit.
  - phpunit
  # Create logs/.
  - mkdir logs
  # Generate code coverage report.
  - phpunit --coverage-clover logs/clover.xml
  # Check for security vulnerabilities.
  - php vendor/bin/security-checker security:check composer.lock

after_script:
  # Create coveralls report.
  - php vendor/bin/coveralls -v

before_install:
  # Install libfann.
  - sudo apt-get -qq update
  - sudo apt-get install -y libfann-dev
  # Install Pecl FANN.
  - pecl install fann
  # Install Pimple as a C extension.
  - git clone https://github.com/silexphp/Pimple > /dev/null
  - cd Pimple/ext/pimple
  - phpize
  - ./configure > /dev/null
  - make
  - sudo make install > /dev/null
  - cd ../../../
  # Add managed php configuration file.
  - phpenv config-add docker/files/etc/php5/fpm/conf.d/noughtsandcrosses-app.ini
  # Update composer.
  - composer self-update

install:
  - composer install

php:
  - 5.5
  - 5.6
  # Disable PHP 7 build - failed to make Pimple.
  # - 7.0
  - hhvm

matrix:
  allow_failures:
    - php: hhvm

Disable PHP 7 build - failed to make Pimple
Disable PHP 7 build - failed to make Pimple
