#Travis CI

language: php

dist: trusty
sudo: false

php:
 - 7.2

branches:
 - master

before_script:
#- pecl install channel://pecl.php.net/pthreads-3.1.6
 - git clone https://github.com/krakjoe/pthreads.git --depth=1
 - cd pthreads
 - phpize
 - ./configure
 - make
 - make install
 - cd ..
 - echo "extension=pthreads.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
 - echo | pecl install channel://pecl.php.net/yaml-2.0.2
 - git clone --recursive https://github.com/pmmp/PocketMine-MP.git --depth=1
 - cd PocketMine-MP
 - mkdir plugins
 - cd plugins
 - wget -O DevTools.phar https://poggit.pmmp.io/r/10317/PocketMine-DevTools.phar
 - cd /home/travis/build/robske110/SignServerStats/
 - cp -rf Travis.php PocketMine-MP/
 - cd PocketMine-MP

script:
 - php Travis.php
 
notifications:
 email: false
#Travis CI

language: php

dist: trusty
sudo: false

php:
 - 7.2

branches:
 - master

before_script:
#- pecl install channel://pecl.php.net/pthreads-3.1.6
 - git clone https://github.com/krakjoe/pthreads.git --depth=1
 - cd pthreads
 - phpize
 - ./configure
 - make
 - make install
 - cd ..
 - echo "extension=pthreads.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
 - echo | pecl install channel://pecl.php.net/yaml-2.0.2
 - git clone --recursive https://github.com/pmmp/PocketMine-MP.git --depth=1
 - cd PocketMine-MP
 - composer install
 - mkdir plugins
 - cd plugins
 - wget -O DevTools.phar https://jenkins.pmmp.io/job/PocketMine-MP/lastSuccessfulBuild/artifact/DevTools.phar
 - cd /home/travis/build/robske110/SignServerStats/
 - cp -rf Travis.php PocketMine-MP/
 - cd PocketMine-MP

script:
 - php Travis.php
 
notifications:
 email: false
Fix composer need; update DevTools link
Travis: Fix composer need; update DevTools link
