Make WordPress Core

Changeset 40269


Ignore:
Timestamp:
03/10/2017 10:57:31 PM (8 years ago)
Author:
johnbillion
Message:

Build/Test tools: Get Travis builds working on HHVM again.

This change moves to specifying the PHPUnit version for all PHP versions, and fixes an issue where the Composer global bin directory is not at ~/.composer/vendor/bin on the boxes that are used for HHVM builds.

See #40100

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.travis.yml

    r40267 r40269  
    1010matrix:
    1111  include:
    12   - php: 7
     12  - php: 7.0
    1313    env: WP_TRAVISCI=travis:js
    1414  - php: 5.2
     
    5353before_script:
    5454- |
     55  # Remove Xdebug for a huge performance increase, but not from nightly or hhvm:
    5556  stable='^[0-9\.]+$'
    5657  if [[ "$TRAVIS_PHP_VERSION" =~ $stable ]]; then
    5758    phpenv config-rm xdebug.ini
    5859  fi
    59 - export PATH="$HOME/.composer/vendor/bin:$PATH"
    6060- |
    61   if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then
    62     composer global require "phpunit/phpunit=5.7.*"
    63   elif [[ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]]; then
    64     composer global require "phpunit/phpunit=4.8.*"
     61  # Export Composer's global bin dir to PATH, but not on PHP 5.2:
     62  if [[ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]]; then
     63    composer config --list --global
     64    export PATH=`composer config --list --global | grep '\[home\]' | { read a; echo "${a#* }/vendor/bin:$PATH"; }`
    6565  fi
     66- |
     67  # Install the specified version of PHPUnit depending on the PHP version:
     68  case "$TRAVIS_PHP_VERSION" in
     69    7.1|7.0|hhvm|nightly)
     70      echo "Using PHPUnit 5.7"
     71      composer global require "phpunit/phpunit=5.7.*"
     72      ;;
     73    5.6|5.5|5.4|5.3)
     74      echo "Using PHPUnit 4.8"
     75      composer global require "phpunit/phpunit=4.8.*"
     76      ;;
     77    5.2)
     78      # Do nothing, use default PHPUnit 3.6.x
     79      echo "Using default PHPUnit, hopefully 3.6"
     80      ;;
     81    *)
     82      echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION"
     83      exit 1
     84      ;;
     85  esac
    6686- npm --version
    6787- node --version
     
    7494- php --version
    7595- |
     96  # Debug PHP extensions, but not on HHVM because the command hangs indefinitely:
    7697  if [[ "$TRAVIS_PHP_VERSION" != 'hhvm' ]]; then
    7798    php -m
     
    79100- npm --version
    80101- node --version
     102- which phpunit
    81103- phpunit --version
    82104- curl --version
Note: See TracChangeset for help on using the changeset viewer.