From 87b7314a87de781776a95ac301438b462b0162d1 Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Thu, 10 Dec 2015 07:50:23 +0000 Subject: [PATCH 1/2] MDL-52472 travis: enable php7 Relegate 5.6 runs (following the principle of highest and lowest version only, to conserve travis resources and get faster test completions) --- .travis.yml | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index c462b85db94..330a94a9642 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,16 +12,12 @@ notifications: language: php php: - # Moodle supports versions 5.4, 5.5, and 5.6 of PHP. - # Order by fastest to slowest. - # We currently only run the highest and lowest versions to reduce the load on travis-ci.org. - - 5.6 + # We only run the highest and lowest supported versions to reduce the load on travis-ci.org. + - 7.0 + # - 5.6 # - 5.5 - 5.4 - # We hope to offer PHP 7 support in the near future. - - nightly - services: # Ensure that memcached and mongodb are running for testing of those MUC stores. - memcached @@ -50,29 +46,18 @@ matrix: # It will not stop the jobs from running. fast_finish: true - # Always allow failure on nightly. - # It's a nightly build and failures can happen. - allow_failures: - - php: nightly - exclude: - # PHP 7 is not yet supported for actual runs. - # Exclude it by default - we include it for CITEST only later. - - php: nightly - # MySQL - it's just too slow. - # Exclude it on all versions except for 5.6. + # Exclude it on all versions except for 7.0 + # - env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false + # php: 5.6 + # # - env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false # php: 5.5 - env: DB=mysqli PHPUNIT=true INSTALL=false CITEST=false php: 5.4 - include: - # Attempt to run the CITEST set on PHP 7. - - php: nightly - env: DB=none PHPUNIT=false INSTALL=false CITEST=true - cache: directories: - $HOME/.composer/cache From f2f29ea2c73c46fdb7b1b70dc1b08b0a00c560c6 Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Thu, 10 Dec 2015 17:32:33 +0000 Subject: [PATCH 2/2] MDL-52472 travis: remove mongo/memcached testing At the moment the extensions aren't available in php7 env: https://github.com/travis-ci/travis-ci/issues/5256 And really its probably not worth the effort/buildtime to enable them IMO so simpler to just disable. --- .travis.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 330a94a9642..08d83389938 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,11 +18,6 @@ php: # - 5.5 - 5.4 -services: - # Ensure that memcached and mongodb are running for testing of those MUC stores. - - memcached - - mongodb - env: # Although we want to run these jobs and see failures as quickly as possible, we also want to get the slowest job to # start first so that the total run time is not too high. @@ -71,10 +66,6 @@ install: # Typically it should be able to use the Composer cache if any other job has already completed before we started here. - travis_retry composer install --prefer-dist --no-interaction - - echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - before_script: - > if [ "$INSTALL" = 'true' -o "$PHPUNIT" = 'true' ]; @@ -129,9 +120,6 @@ before_script: sed -i \ -e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \ -e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \ - -e "/require_once/i define('TEST_CACHESTORE_MEMCACHE_TESTSERVERS', '127.0.0.1:11211');" \ - -e "/require_once/i define('TEST_CACHESTORE_MEMCACHED_TESTSERVERS', '127.0.0.1:11211');" \ - -e "/require_once/i define('TEST_CACHESTORE_MONGODB_TESTSERVER', 'mongodb://localhost:27017');" \ config.php ; # Initialise PHPUnit for Moodle.