8000 Add travis_fold.sh file · symfony/symfony@759b505 · GitHub
[go: up one dir, main page]

Skip to content
65F6

Commit 759b505

Browse files
committed
Add travis_fold.sh file
1 parent 904f68a commit 759b505

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

.github/travis_fold.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
#######################################
4+
# Fold Travis CI output
5+
# Arguments:
6+
# $1 fold name
7+
# $2 command to execute
8+
#######################################
9+
fold () {
10+
FOLD=$(echo $1 | tr / .)
11+
echo "travis_fold:start:$FOLD"
12+
echo -e "\\e[32m$FOLD\\e[0m"
13+
sh -c "$2" && echo "travis_fold:end:$FOLD"
14+
}
15+
16+
export -f fold

.travis.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,13 @@ install:
8282
- if [[ ! $skip ]]; then composer update --no-suggest; fi
8383
- if [[ ! $skip ]]; then ./phpunit install; fi
8484
- if [[ ! $skip && ! $PHP = hhvm* ]]; then php -i; else hhvm --php -r 'print_r($_SERVER);print_r(ini_get_all());'; fi
85+
- .github/travis_fold.sh
8586

8687
script:
87-
- FOLD_START='echo "travis_fold:start:$FOLD"; echo -e "\\e[32m$FOLD\\e[0m"'
88-
- FOLD_END='echo "travis_fold:end:$FOLD"'
8988
- if [[ $skip ]]; then echo -e "\\n\\e[1;34mIntermediate PHP version $PHP is skipped for pull requests.\\e[0m"; fi
90-
- if [[ ! $deps && ! $PHP = hhvm* ]]; then echo "$COMPONENTS" | parallel --gnu 'FOLD=$(echo "{}.PHPUnit"|tr / .); '$FOLD_START'; $PHPUNIT --exclude-group tty,benchmark,intl-data {} && '$FOLD_END; fi
91-
- if [[ ! $deps && ! $PHP = hhvm* ]]; then FOLD="PHPUnit.tty"; eval $FOLD_START; $PHPUNIT --group tty && eval $FOLD_END; fi
92-
- if [[ ! $deps && $PHP = hhvm* ]]; then FOLD="PHPUnit.hhvm"; $PHPUNIT --exclude-group benchmark,intl-data && eval $FOLD_END; fi
93-
- if [[ ! $deps && $PHP = ${MIN_PHP%.*} ]]; then echo -e "1\\n0" | xargs -I{} sh -c 'FOLD="PHPUnit.sigchild"; '$FOLD_START'; ENHANCE_SIGCHLD={} php-$MIN_PHP/sapi/cli/php .phpunit/phpunit-4.8/phpunit --colors=always src/Symfony/Component/Process/ && '$FOLD_END; fi
94-
- if [[ $deps = high ]]; then echo "$COMPONENTS" | parallel --gnu -j10% 'FOLD=$(echo "{}.composer"|tr / .); '$FOLD_START'; cd {}; composer update --no-progress --no-suggest --ansi 2>&1 && '$FOLD_END'; FOLD=$(echo "{}.PHPUnit"|tr / .); '$FOLD_START'; $PHPUNIT --exclude-group tty,benchmark,intl-data$LEGACY && '$FOLD_END; fi
95-
- if [[ $deps = low ]]; then echo "$COMPONENTS" | parallel --gnu -j10% 'FOLD=$(echo "{}.composer"|tr / .); '$FOLD_START'; cd {}; composer update --no-progress --no-suggest --ansi --prefer-lowest --prefer-stable 2>&1 && '$FOLD_END'; FOLD=$(echo "{}.PHPUnit"|tr / .); '$FOLD_START'; $PHPUNIT --exclude-group tty,benchmark,intl-data && '$FOLD_END; fi
89+
- if [[ ! $deps && ! $PHP = hhvm* ]]; then echo "$COMPONENTS" | parallel --gnu 'fold {}.PHPUnit "$PHPUNIT --exclude-group tty,benchmark,intl-data {}"'; fi
90+
- if [[ ! $deps && ! $PHP = hhvm* ]]; then fold PHPUnit.tty "$PHPUNIT --group tty"; fi
91+
- if [[ ! $deps && $PHP = hhvm* ]]; then $PHPUNIT --exclude-group benchmark,intl-data; fi
92+
- if [[ ! $deps && $PHP = ${MIN_PHP%.*} ]]; then echo -e "1\\n0" | xargs -I{} sh -c 'fold PHPUnit.sigchild "ENHANCE_SIGCHLD={} php-$MIN_PHP/sapi/cli/php .phpunit/phpunit-4.8/phpunit --colors=always src/Symfony/Component/Process/"'; fi
93+
- if [[ $deps = high ]]; then echo "$COMPONENTS" | parallel --gnu -j10% 'fold {}.composer "cd {}; composer update --no-progress --no-suggest --ansi 2>&1"; fold {}.PHPUnit "$PHPUNIT --exclude-group tty,benchmark,intl-data$LEGACY"'; fi
94+
- if [[ $deps = low ]]; then echo "$COMPONENTS" | parallel --gnu -j10% 'fold {}.composer "cd {}; composer update --no-progress --no-suggest --ansi --prefer-lowest --prefer-stable 2>&1"; fold {}.PHPUnit "$PHPUNIT --exclude-group tty,benchmark,intl-data"'; fi

0 commit comments

Comments
 (0)
0