sudo: false
language: php

php:
  - 7.0
  - 7.1
  - 7.2
  - 7.3
  - 7.4
  - 8.0
  - nightly

before_script:
  # Disable Xdebug because it should be unrelated to the functionality of php-ast being tested.
  # Xdebug will have issues as PHP 8.1.0-dev/nightly's internal functionality changes.
  - phpenv config-rm xdebug.ini || true
  - phpize
  - ./configure
  - make
  - make install
  - echo "extension=ast.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini

script:
  - REPORT_EXIT_STATUS=1 php ./run-tests.php -P -q --show-diff

