[travis][appveyor] use symfony/flex to accelerate builds

This commit is contained in:
Nicolas Grekas 2018-08-14 11:06:16 +02:00
parent 30b24d200b
commit 940ec8f2d5
2 changed files with 13 additions and 2 deletions

View File

@ -52,7 +52,7 @@ before_install:
if [[ $TRAVIS_PHP_VERSION = 5.* || $TRAVIS_PHP_VERSION = hhvm* ]]; then
composer () {
$HOME/.phpenv/versions/7.1/bin/composer config platform.php $(echo ' <?php echo preg_replace("/-.*/", "", PHP_VERSION);' | php /dev/stdin)
$HOME/.phpenv/versions/7.1/bin/php $HOME/.phpenv/versions/7.1/bin/composer config platform.php $(echo ' <?php echo preg_replace("/-.*/", "", PHP_VERSION);' | php /dev/stdin)
$HOME/.phpenv/versions/7.1/bin/php $HOME/.phpenv/versions/7.1/bin/composer $*
}
export -f composer
@ -188,6 +188,15 @@ install:
SYMFONY_VERSION=$(cat composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*')
fi
- |
# Install symfony/flex
if [[ $deps = low ]]; then
export SYMFONY_REQUIRE='>=2.3'
else
export SYMFONY_REQUIRE=">=$SYMFONY_VERSION"
fi
composer global require symfony/flex dev-master
- |
# Legacy tests are skipped when deps=high and when the current branch version has not the same major version number than the next one
[[ $deps = high && ${SYMFONY_VERSION%.*} != $(git show $(git ls-remote --heads | grep -FA1 /$SYMFONY_VERSION | tail -n 1):composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9]*' | head -n 1) ]] && LEGACY=,legacy

View File

@ -10,6 +10,7 @@ init:
- SET PATH=c:\php;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET SYMFONY_DEPRECATIONS_HELPER=strict
- SET "SYMFONY_REQUIRE=>=2.8"
- SET ANSICON=121x90 (121x90)
- SET SYMFONY_PHPUNIT_VERSION=4.8
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v DelayedExpansion /t REG_DWORD /d 1 /f
@ -51,9 +52,10 @@ install:
- copy /Y php.ini-min php.ini
- echo extension=php_openssl.dll >> php.ini
- cd c:\projects\symfony
- IF NOT EXIST composer.phar (appveyor DownloadFile https://getcomposer.org/download/1.3.0/composer.phar)
- IF NOT EXIST composer.phar (appveyor DownloadFile https://github.com/composer/composer/releases/download/1.7.1/composer.phar)
- php composer.phar self-update
- copy /Y .composer\* %APPDATA%\Composer\
- php composer.phar global require --no-progress symfony/flex dev-master
- php .github/build-packages.php "HEAD^" src\Symfony\Bridge\PhpUnit
- IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev)
- php composer.phar config platform.php 5.3.9