travis
authorgggeek <giunta.gaetano@gmail.com>
Sat, 18 May 2019 10:00:24 +0000 (10:00 +0000)
committergggeek <giunta.gaetano@gmail.com>
Sat, 18 May 2019 10:00:24 +0000 (10:00 +0000)
.travis.yml
tests/ci/travis/apache_vhost_hhvm [deleted file]
tests/ci/travis/setup_apache_hhvm.sh [deleted file]
tests/ci/travis/setup_hhvm.sh [deleted file]
tests/ci/travis/setup_php_fpm.sh

index a3641a4..a287dd5 100644 (file)
@@ -1,11 +1,12 @@
 language: php
 
+# As of May 2019, Travis is phasing out VMs based on Precise, which means that we can only test on php >= 5.6 going forward...
 dist: xenial
 
 php:
-  - 5.3
-  - 5.4
-  - 5.5
+  #- 5.3
+  #- 5.4
+  #- 5.5
   - 5.6
   - 7.0
   - 7.1
@@ -19,23 +20,21 @@ before_install:
   - sudo apt-get install -y privoxy
 
   # Disable xdebug for speed (executing composer), but allow us to re-enable it later
-  # NB: 'php -i' does not work on hhvm
-  - if [ "$TRAVIS_PHP_VERSION" = "hhvm" ]; then export XDEBUG_INI=''; fi
-  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then export XDEBUG_INI=`php -i | grep xdebug.ini | grep home/travis | grep -v '=>' | head -1`; fi
+  - export XDEBUG_INI=`php -i | grep xdebug.ini | grep home/travis | grep -v '=>' | head -1`
   - export XDEBUG_INI=${XDEBUG_INI/,/}
   - if [ "$XDEBUG_INI" != "" ]; then mv "$XDEBUG_INI" "$XDEBUG_INI.bak"; fi
 
 install:
-  - composer self-update && composer install
+  - composer install
 
   # Re-enable xdebug for when we need to generate code coverage
   - export COVERAGE_OPTS=""
-  - if [ "$TRAVIS_PHP_VERSION" = "5.6" -a "$XDEBUG_INI" != "" ]; then mv "$XDEBUG_INI.bak" "$XDEBUG_INI" && export COVERAGE_OPTS="--coverage-clover=coverage.clover"; fi
+  - if [ "$TRAVIS_PHP_VERSION" = "7.3" -a "$XDEBUG_INI" != "" ]; then mv "$XDEBUG_INI.bak" "$XDEBUG_INI" && export COVERAGE_OPTS="--coverage-clover=coverage.clover"; fi
 
 before_script:
   # Set up Apache and Privoxy instances inside the Travis VM and use them for testing against
-  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then ./tests/ci/travis/setup_php_fpm.sh; ./tests/ci/travis/setup_apache.sh; fi
-  - if [ "$TRAVIS_PHP_VERSION" = "hhvm" ]; then ./tests/ci/travis/setup_hhvm.sh; ./tests/ci/travis/setup_apache_hhvm.sh; fi
+  - ./tests/ci/travis/setup_php_fpm.sh
+  - ./tests/ci/travis/setup_apache.sh
   - ./tests/ci/travis/setup_privoxy.sh
 
   # output what version of phpunit we got going
@@ -50,7 +49,6 @@ after_failure:
   # Save as much info as we can to help developers
   - cat apache_error.log
   - cat apache_access.log
-  #- if [ "$TRAVIS_PHP_VERSION" = "hhvm" ]; then cat /var/log/hhvm/error.log; fi
 
 after_script:
   # Upload code-coverage to Scrutinizer
diff --git a/tests/ci/travis/apache_vhost_hhvm b/tests/ci/travis/apache_vhost_hhvm
deleted file mode 100644 (file)
index 63e57da..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-# Configuration file for Apache running on Travis.
-# HHVM setup in FCGI mode
-
-<VirtualHost *:80>
-
-  DocumentRoot %TRAVIS_BUILD_DIR%
-
-  ErrorLog "%TRAVIS_BUILD_DIR%/apache_error.log"
-  CustomLog "%TRAVIS_BUILD_DIR%/apache_access.log" combined
-
-  <Directory "%TRAVIS_BUILD_DIR%">
-    Options FollowSymLinks MultiViews ExecCGI
-    AllowOverride All
-    Order deny,allow
-    Allow from all
-  </Directory>
-
-  # Configure Apache for HHVM FastCGI.
-  # See https://github.com/facebook/hhvm/wiki/fastcgi
-  <IfModule mod_fastcgi.c>
-    <FilesMatch \.php$>
-      SetHandler hhvm-php-extension
-    </FilesMatch>
-    Alias /hhvm /hhvm
-    Action hhvm-php-extension /hhvm virtual
-    FastCgiExternalServer /hhvm -host 127.0.0.1:9000 -pass-header Authorization -idle-timeout 300
-  </IfModule>
-
-</VirtualHost>
-
-<IfModule mod_ssl.c>
-
-<VirtualHost _default_:443>
-
-  DocumentRoot %TRAVIS_BUILD_DIR%
-
-  ErrorLog "%TRAVIS_BUILD_DIR%/apache_error.log"
-  CustomLog "%TRAVIS_BUILD_DIR%/apache_access.log" combined
-
-  <Directory "%TRAVIS_BUILD_DIR%">
-    Options FollowSymLinks MultiViews ExecCGI
-    AllowOverride All
-    Order deny,allow
-    Allow from all
-  </Directory>
-
-  # Configure Apache for HHVM FastCGI.
-  # See https://github.com/facebook/hhvm/wiki/fastcgi
-  <IfModule mod_fastcgi.c>
-    <FilesMatch \.php$>
-      SetHandler hhvm-php-extension
-    </FilesMatch>
-    Alias /hhvm /hhvm
-    Action hhvm-php-extension /hhvm virtual
-    #FastCgiExternalServer /hhvm -host 127.0.0.1:9000 -pass-header Authorization -idle-timeout 300
-  </IfModule>
-
-  SSLEngine on
-  # This cert is bundled by default in Ubuntu
-  SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
-  SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
-
-  <FilesMatch "\.(cgi|shtml|phtml|php)$">
-    SSLOptions +StdEnvVars
-  </FilesMatch>
-
-  BrowserMatch "MSIE [2-6]" \
-  nokeepalive ssl-unclean-shutdown \
-  downgrade-1.0 force-response-1.0
-  BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
-
-</VirtualHost>
-
-</IfModule>
diff --git a/tests/ci/travis/setup_apache_hhvm.sh b/tests/ci/travis/setup_apache_hhvm.sh
deleted file mode 100755 (executable)
index a72941d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-# set up Apache for hhvm-fcgi
-# @see https://github.com/travis-ci/travis-ci.github.com/blob/master/docs/user/languages/php.md#apache--php
-
-sudo a2enmod rewrite actions fastcgi alias ssl
-
-# configure apache virtual hosts
-sudo cp -f tests/ci/travis/apache_vhost_hhvm /etc/apache2/sites-available/default
-sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
-sudo service apache2 restart
diff --git a/tests/ci/travis/setup_hhvm.sh b/tests/ci/travis/setup_hhvm.sh
deleted file mode 100755 (executable)
index 289e750..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-# start HHVM
-hhvm -m daemon -vServer.Type=fastcgi -vServer.Port=9000 -vServer.FixPathInfo=true
index a31aadb..05098ea 100755 (executable)
@@ -3,14 +3,19 @@
 # enable php-fpm
 sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
 # work around travis issue #3385
-if [ "$TRAVIS_PHP_VERSION" = "7.0" -a -n "$(ls -A ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d)" ]; then
-  sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
-fi
-if [ "$TRAVIS_PHP_VERSION" = "7.1" -a -n "$(ls -A ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d)" ]; then
-  sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
-fi
-if [ "$TRAVIS_PHP_VERSION" = "7.2" -a -n "$(ls -A ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d)" ]; then
-  sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
+if [ "-d ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d" ]; then
+    if [ "$TRAVIS_PHP_VERSION" = "7.0" -a -n "$(ls -A ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d)" ]; then
+      sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
+    fi
+    if [ "$TRAVIS_PHP_VERSION" = "7.1" -a -n "$(ls -A ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d)" ]; then
+      sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
+    fi
+    if [ "$TRAVIS_PHP_VERSION" = "7.2" -a -n "$(ls -A ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d)" ]; then
+      sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
+    fi
+    if [ "$TRAVIS_PHP_VERSION" = "7.3" -a -n "$(ls -A ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d)" ]; then
+      sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
+    fi
 fi
 echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
 echo "always_populate_raw_post_data = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini