7
7
- parallel
8
8
- language-pack-fr-base
9
9
10
- cache :
11
- directories :
12
- - .phpunit
13
- - php-5.3.9
10
+ env :
11
+ global :
12
+ - MIN_PHP=5.3.9
14
13
15
14
matrix :
16
15
include :
@@ -20,45 +19,48 @@ matrix:
20
19
- php : 5.5
21
20
- php : 5.6
22
21
env : deps=high
23
- - php : 7
22
+ - php : 7.0
24
23
env : deps=low
25
24
fast_finish : true
26
25
27
- services : mongodb
26
+ cache :
27
+ directories :
28
+ - .phpunit
29
+ - php-$MIN_PHP
28
30
29
- env :
30
- global :
31
- - deps=no
32
- - SYMFONY_DEPRECATIONS_HELPER=weak
31
+ services : mongodb
33
32
34
33
before_install :
35
- - if [[ " $deps" = "no" ]] && [[ " $TRAVIS_PHP_VERSION" =~ 5.[45] ]] && [[ " $TRAVIS_PULL_REQUEST" != " false" ]]; then export deps=skip; fi;
36
- - if [[ $deps = no && $TRAVIS_PHP_VERSION = 5.3 && ! -d php-5.3.9 /sapi ]]; then wget http://museum.php.net/php5/php-5.3.9. tar.bz2; tar -xjf php-5.3.9. tar.bz2 ; (cd php-5.3.9 ; ./configure --enable-sigchild --enable-pcntl; make -j2); fi;
37
- - if [[ " $TRAVIS_PHP_VERSION" != " hhvm" ]]; then INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; else INI_FILE=/etc/hhvm/php.ini; fi;
38
- - echo " memory_limit = -1" >> $INI_FILE
39
- - echo " session.gc_probability = 0" >> $INI_FILE
40
- - if [ "$deps" != "skip" ] ; then composer self-update ; fi;
41
- - if [[ " $TRAVIS_PHP_VERSION" != "hhvm" ]]; then phpenv config-rm xdebug.ini ; fi;
42
- - if [[ " $TRAVIS_PHP_VERSION" = 5.* ]]; then echo "extension = mongo.so" >> $INI_FILE; fi;
43
- - if [[ " $TRAVIS_PHP_VERSION" = 5.* ]]; then echo "extension = memcache.so" >> $INI_FILE ; fi;
44
- - if [[ " $TRAVIS_PHP_VERSION" = 5.* ]]; then (echo yes | pecl install -f apcu-4.0.8 && echo "apc.enable_cli = 1" >> $INI_FILE) || echo "Let's continue without apcu extension" ; fi;
45
- - if [[ " $TRAVIS_PHP_VERSION" = 5.* ]]; then pecl install -f memcached-2.1.0 || echo "Let's continue without memcached extension" ; fi;
46
- - if [[ " $TRAVIS_PHP_VERSION" = 5.* ]] && [ "$deps" = "no" ] ; then (cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && echo "extension = $(pwd)/modules/symfony_debug.so" >> $INI_FILE) ; fi;
47
- - if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then php -i; else hhvm --php -r 'print_r($_SERVER);print_r(ini_get_all());' ; fi;
48
- - if [ " $deps" != " skip" ]; then ./phpunit install; fi;
49
- - export PHPUNIT=" $(readlink -f ./phpunit)"
34
+ - if [[ ! $deps && ! $TRAVIS_PHP_VERSION = ${MIN_PHP%.*} && $TRAVIS_PHP_VERSION != hhvm && $TRAVIS_PULL_REQUEST != false ]]; then deps=skip; fi;
35
+ - if [[ ! $deps && ! -d php-$MIN_PHP /sapi ]]; then wget http://museum.php.net/php5/php-$MIN_PHP. tar.bz2 -O - | tar -xj ; (cd php-$MIN_PHP ; ./configure --enable-sigchild --enable-pcntl; make -j2); fi;
36
+ - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; else INI_FILE=/etc/hhvm/php.ini; fi;
37
+ - echo memory_limit = -1 >> $INI_FILE
38
+ - echo session.gc_probability = 0 >> $INI_FILE
39
+ - if [[ $TRAVIS_PHP_VERSION = 5.* ]] ; then echo extension = mongo.so >> $INI_FILE ; fi;
40
+ - if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then echo extension = memcache.so >> $INI_FILE ; fi;
41
+ - if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then ( echo yes | pecl install -f apcu-4.0.10 && echo apc.enable_cli = 1 >> $INI_FILE) || echo "Let's continue without apcu extension" ; fi;
42
+ - if [[ $TRAVIS_PHP_VERSION = 5.* ]]; then pecl install -f memcached-2.1.0 || echo "Let's continue without memcached extension" ; fi;
43
+ - if [[ $TRAVIS_PHP_VERSION = 5.* && ! $deps ]]; then (cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && echo extension = $(pwd)/modules/symfony_debug.so >> $INI_FILE); fi;
44
+ - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo extension = ldap.so >> $INI_FILE ; fi;
45
+ - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini ; fi;
46
+ - if [[ $deps != skip ]]; then composer self-update ; fi;
47
+ - if [[ $deps != skip ] ]; then ./phpunit install; fi;
48
+ - export PHPUNIT=$(readlink -f ./phpunit)
50
49
51
50
install :
52
- - if [ "$TRAVIS_BRANCH" = "master" ]; then export COMPOSER_ROOT_VERSION=dev-master; else export COMPOSER_ROOT_VERSION="$TRAVIS_BRANCH".x-dev; fi;
53
- - if [ "$deps" = "no" ]; then export SYMFONY_DEPRECATIONS_HELPER=strict; fi;
54
- - if [ "$deps" = "no" ]; then composer --prefer-source install; fi;
55
- - if [ "$deps" != "skip" ]; then COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi;
56
- - if [ "$deps" != "skip" ] && [ "$deps" != "no" ]; then php .travis.php $TRAVIS_COMMIT_RANGE $TRAVIS_BRANCH $COMPONENTS; fi;
51
+ - if [[ $deps != skip ]]; then COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi;
52
+ - if [[ $deps != skip && $deps ]]; then php .travis.php $TRAVIS_COMMIT_RANGE $TRAVIS_BRANCH $COMPONENTS; fi;
53
+ - if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then SYMFONY_VERSION=$(git branch -r | grep -o '/[1-9].*' | tail -n 1 | sed s/.//); else SYMFONY_VERSION=$(cat composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*'); fi;
54
+ - if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then git fetch origin $SYMFONY_VERSION; git checkout -m FETCH_HEAD; fi;
55
+ - if [[ $deps = high && ${SYMFONY_VERSION%.*} != $(git show $(git branch -r | grep -FA1 /$SYMFONY_VERSION | tail -n 1):composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9]*' | head -n 1) ]]; then LEGACY=,legacy; fi;
56
+ - export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev;
57
+ - if [[ ! $deps ]]; then composer --prefer-source install; else export SYMFONY_DEPRECATIONS_HELPER=weak; fi;
58
+ - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then php -i; else hhvm --php -r 'print_r($_SERVER);print_r(ini_get_all());'; fi;
57
59
58
60
script :
59
- - if [ " $deps" = "no" ]; then echo "$COMPONENTS" | parallel --gnu '$PHPUNIT --exclude-group tty,benchmark,intl-data {}'; fi;
60
- - if [ " $deps" = "no" ]; then echo -e "\\nRunning tests requiring tty"; $PHPUNIT --group tty; fi;
61
- - if [[ $deps = no && $TRAVIS_PHP_VERSION = 5.3 ]]; then echo -e "1\\n0" | parallel --gnu 'echo -e "\\nPHP --enable-sigchild enhanced={}" && ENHANCE_SIGCHLD={} php-5.3.9 /sapi/cli/php .phpunit/phpunit-4.8/phpunit --colors=always src/Symfony/Component/Process/'; fi;
62
- - if [ " $deps" = " high" ] ; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; composer --prefer-source update; $PHPUNIT --exclude-group tty,benchmark,intl-data'; fi;
63
- - if [ " $deps" = " low" ]; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; composer --prefer-source --prefer-lowest --prefer-stable update; $PHPUNIT --exclude-group tty,benchmark,intl-data'; fi;
64
- - if [ " $deps" = " skip" ] ; then echo ' This matrix line is skipped for pull requests.' ; fi;
61
+ - if [[ ! $deps ] ]; then echo "$COMPONENTS" | parallel --gnu '$PHPUNIT --exclude-group tty,benchmark,intl-data {}'; fi;
62
+ - if [[ ! $deps ] ]; then echo -e "\\nRunning tests requiring tty"; $PHPUNIT --group tty; fi;
63
+ - if [[ ! $deps && $TRAVIS_PHP_VERSION = ${MIN_PHP%.*} ]]; then echo -e "1\\n0" | parallel --gnu 'echo -e "\\nPHP --enable-sigchild enhanced={}" && ENHANCE_SIGCHLD={} php-$MIN_PHP /sapi/cli/php .phpunit/phpunit-4.8/phpunit --colors=always src/Symfony/Component/Process/'; fi;
64
+ - if [[ $deps = high ]] ; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; composer --prefer-source update; $PHPUNIT --exclude-group tty,benchmark,intl-data'$LEGACY ; fi;
65
+ - if [[ $deps = low ] ]; then echo "$COMPONENTS" | parallel --gnu -j10% 'cd {}; composer --prefer-source --prefer-lowest --prefer-stable update; $PHPUNIT --exclude-group tty,benchmark,intl-data'; fi;
66
+ - if [[ $deps = skip ]] ; then echo This matrix line is skipped for pull requests.; fi;
0 commit comments