Skip to content

Commit

Permalink
Use travis output folding to try to mitigate large build fails
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsternberg committed Sep 18, 2017
1 parent 8320f37 commit 346a5f9
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion tests/bin/install-php-phpunit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ ORIG_DIR=`pwd`;
THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PHP52_PATH=$HOME/.phpbrew/php/php-5.2.17

travis_fold() {
local action=$1
local name=$2
echo -en "travis_fold:${action}:${name}\r"
}

# install phpunit
travis_fold start installphpunit

mkdir -p $HOME/phpunit-bin

Expand All @@ -27,9 +34,13 @@ fi

export PATH=$HOME/phpunit-bin/:$PATH

travis_fold end installphpunit

if [[ ${SWITCH_TO_PHP:0:3} == "5.2" ]] || [[ ${SWITCH_TO_PHP:0:3} == "5.3" ]]; then
PHPBREW_BUILT_CHECK=$HOME/.phpbrew/bashrc

travis_fold start installphpbrew

# directory to install phpbrew into
mkdir -p $HOME/php-utils-bin

Expand All @@ -40,9 +51,13 @@ if [[ ${SWITCH_TO_PHP:0:3} == "5.2" ]] || [[ ${SWITCH_TO_PHP:0:3} == "5.3" ]]; t
# needs to be on the path for switching php versions to work
export PATH=$HOME/php-utils-bin:$PATH

travis_fold end installphpbrew

# php and phpunit3.6 installs should be cached, only build if they're not there.
if [ ! -f $PHPBREW_BUILT_CHECK ]; then


travis_fold start buildphpunit

# init with known --old to get 5.2 and 5.3
$HOME/php-utils-bin/phpbrew init
$HOME/php-utils-bin/phpbrew known --old
Expand Down Expand Up @@ -106,6 +121,8 @@ if [[ ${SWITCH_TO_PHP:0:3} == "5.2" ]] || [[ ${SWITCH_TO_PHP:0:3} == "5.3" ]]; t

# clean up build directory
rm -rf $HOME/.phpbrew/build/*

travis_fold end buildphpunit
fi

# all needed php versions and phpunit versions are installed, either from the above
Expand Down

0 comments on commit 346a5f9

Please sign in to comment.