[travis] install from dist except for selected components
This commit is contained in:
parent
1818445dbc
commit
1de84836cf
@ -52,7 +52,7 @@ install:
|
|||||||
- cd c:\projects\symfony
|
- cd c:\projects\symfony
|
||||||
- IF NOT EXIST composer.phar (appveyor DownloadFile https://github.com/composer/composer/releases/download/1.9.0/composer.phar)
|
- IF NOT EXIST composer.phar (appveyor DownloadFile https://github.com/composer/composer/releases/download/1.9.0/composer.phar)
|
||||||
- php composer.phar self-update
|
- php composer.phar self-update
|
||||||
- copy /Y .composer\* %APPDATA%\Composer\
|
- copy /Y .github\composer-config.json %APPDATA%\Composer\config.json
|
||||||
- php composer.phar global require --no-progress --no-scripts --no-plugins symfony/flex dev-master
|
- php composer.phar global require --no-progress --no-scripts --no-plugins symfony/flex dev-master
|
||||||
- php .github/build-packages.php "HEAD^" src\Symfony\Bridge\PhpUnit
|
- 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)
|
- IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev)
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"config": {
|
|
||||||
"preferred-install": {
|
|
||||||
"*": "dist"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
10
.github/composer-config.json
vendored
Normal file
10
.github/composer-config.json
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"config": {
|
||||||
|
"preferred-install": {
|
||||||
|
"symfony/form": "source",
|
||||||
|
"symfony/http-kernel": "source",
|
||||||
|
"symfony/validator": "source",
|
||||||
|
"*": "dist"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
21
.travis.yml
21
.travis.yml
@ -64,7 +64,7 @@ before_install:
|
|||||||
mkdir /tmp/slapd
|
mkdir /tmp/slapd
|
||||||
slapd -f src/Symfony/Component/Ldap/Tests/Fixtures/conf/slapd.conf -h ldap://localhost:3389 &
|
slapd -f src/Symfony/Component/Ldap/Tests/Fixtures/conf/slapd.conf -h ldap://localhost:3389 &
|
||||||
[ -d ~/.composer ] || mkdir ~/.composer
|
[ -d ~/.composer ] || mkdir ~/.composer
|
||||||
cp .composer/* ~/.composer/
|
cp .github/composer-config.json ~/.composer/config.json
|
||||||
export PHPUNIT=$(readlink -f ./phpunit)
|
export PHPUNIT=$(readlink -f ./phpunit)
|
||||||
export PHPUNIT_X="$PHPUNIT --exclude-group tty,benchmark,intl-data"
|
export PHPUNIT_X="$PHPUNIT --exclude-group tty,benchmark,intl-data"
|
||||||
export COMPOSER_UP='composer update --no-progress --no-suggest --ansi'
|
export COMPOSER_UP='composer update --no-progress --no-suggest --ansi'
|
||||||
@ -95,7 +95,7 @@ before_install:
|
|||||||
|
|
||||||
# tfold is a helper to create folded reports
|
# tfold is a helper to create folded reports
|
||||||
tfold () {
|
tfold () {
|
||||||
local title="🐘 $PHP $1"
|
local title="🐘 $PHP $1 $FLIP"
|
||||||
local fold=$(echo $title | sed -r 's/[^-_A-Za-z0-9]+/./g')
|
local fold=$(echo $title | sed -r 's/[^-_A-Za-z0-9]+/./g')
|
||||||
shift
|
shift
|
||||||
local id=$(printf %08x $(( RANDOM * RANDOM )))
|
local id=$(printf %08x $(( RANDOM * RANDOM )))
|
||||||
@ -202,7 +202,7 @@ install:
|
|||||||
#SYMFONY_PHPUNIT_BRIDGE_PR=32886
|
#SYMFONY_PHPUNIT_BRIDGE_PR=32886
|
||||||
|
|
||||||
if [[ $SYMFONY_PHPUNIT_BRIDGE_PR ]]; then
|
if [[ $SYMFONY_PHPUNIT_BRIDGE_PR ]]; then
|
||||||
git fetch origin refs/pull/$SYMFONY_PHPUNIT_BRIDGE_PR/head
|
git fetch --depth=2 origin refs/pull/$SYMFONY_PHPUNIT_BRIDGE_PR/head
|
||||||
git rm -rq src/Symfony/Bridge/PhpUnit
|
git rm -rq src/Symfony/Bridge/PhpUnit
|
||||||
git checkout -q FETCH_HEAD -- src/Symfony/Bridge/PhpUnit
|
git checkout -q FETCH_HEAD -- src/Symfony/Bridge/PhpUnit
|
||||||
SYMFONY_VERSION=$(cat src/Symfony/Bridge/PhpUnit/composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*')
|
SYMFONY_VERSION=$(cat src/Symfony/Bridge/PhpUnit/composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*')
|
||||||
@ -230,8 +230,9 @@ install:
|
|||||||
- |
|
- |
|
||||||
# For the master branch, when deps=high, the version before master is checked out and tested with the locally patched components
|
# For the master branch, when deps=high, the version before master is checked out and tested with the locally patched components
|
||||||
if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then
|
if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then
|
||||||
|
export FLIP='🙃'
|
||||||
SYMFONY_VERSION=$(git ls-remote --heads | grep -o '/[1-9].*' | tail -n 1 | sed s/.//) &&
|
SYMFONY_VERSION=$(git ls-remote --heads | grep -o '/[1-9].*' | tail -n 1 | sed s/.//) &&
|
||||||
git fetch origin $SYMFONY_VERSION &&
|
git fetch --depth=2 origin $SYMFONY_VERSION &&
|
||||||
git checkout -m FETCH_HEAD &&
|
git checkout -m FETCH_HEAD &&
|
||||||
COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
|
COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
|
||||||
else
|
else
|
||||||
@ -269,7 +270,7 @@ install:
|
|||||||
set -e
|
set -e
|
||||||
export PHP=$1
|
export PHP=$1
|
||||||
if [[ $PHP != $TRAVIS_PHP_VERSION && $TRAVIS_PULL_REQUEST != false ]]; then
|
if [[ $PHP != $TRAVIS_PHP_VERSION && $TRAVIS_PULL_REQUEST != false ]]; then
|
||||||
echo -e "\\n\\e[1;34mIntermediate PHP version $PHP is skipped for pull requests.\\e[0m"
|
echo -e "\\n\\e[33;1mIntermediate PHP version $PHP is skipped for pull requests.\\e[0m"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
phpenv global ${PHP/hhvm*/hhvm}
|
phpenv global ${PHP/hhvm*/hhvm}
|
||||||
@ -283,12 +284,12 @@ install:
|
|||||||
tfold 'phpunit install' ./phpunit install
|
tfold 'phpunit install' ./phpunit install
|
||||||
fi
|
fi
|
||||||
if [[ $deps = high ]]; then
|
if [[ $deps = high ]]; then
|
||||||
echo "$COMPONENTS" | parallel --gnu "tfold {} 'cd {} && $COMPOSER_UP --prefer-source && $PHPUNIT_X$LEGACY'"
|
echo "$COMPONENTS" | parallel --gnu "tfold {} 'cd {} && $COMPOSER_UP && $PHPUNIT_X$LEGACY'"
|
||||||
elif [[ $deps = low ]]; then
|
elif [[ $deps = low ]]; then
|
||||||
[[ -e ~/php-ext/composer-lowest.lock.tar ]] && tar -xf ~/php-ext/composer-lowest.lock.tar
|
[[ -e ~/php-ext/composer-lowest.lock.tar ]] && tar -xf ~/php-ext/composer-lowest.lock.tar
|
||||||
tar -cf ~/php-ext/composer-lowest.lock.tar --files-from /dev/null
|
tar -cf ~/php-ext/composer-lowest.lock.tar --files-from /dev/null
|
||||||
php .github/rm-invalid-lowest-lock-files.php $COMPONENTS
|
php .github/rm-invalid-lowest-lock-files.php $COMPONENTS
|
||||||
echo "$COMPONENTS" | parallel --gnu "tfold {} 'cd {} && ([ -e composer.lock ] && ${COMPOSER_UP/update/install} || $COMPOSER_UP --prefer-lowest --prefer-stable --prefer-source) && $PHPUNIT_X'"
|
echo "$COMPONENTS" | parallel --gnu "tfold {} 'cd {} && ([ -e composer.lock ] && ${COMPOSER_UP/update/install} || $COMPOSER_UP --prefer-lowest --prefer-stable) && $PHPUNIT_X'"
|
||||||
echo "$COMPONENTS" | xargs -n1 -I{} tar --append -f ~/php-ext/composer-lowest.lock.tar {}/composer.lock
|
echo "$COMPONENTS" | xargs -n1 -I{} tar --append -f ~/php-ext/composer-lowest.lock.tar {}/composer.lock
|
||||||
elif [[ $PHP = hhvm* ]]; then
|
elif [[ $PHP = hhvm* ]]; then
|
||||||
rm src/Symfony/Bridge/PhpUnit -Rf
|
rm src/Symfony/Bridge/PhpUnit -Rf
|
||||||
@ -304,4 +305,8 @@ install:
|
|||||||
}
|
}
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- for PHP in $TRAVIS_PHP_VERSION $php_extra; do (run_tests $PHP); done
|
- for PHP in $TRAVIS_PHP_VERSION $php_extra; do
|
||||||
|
(run_tests $PHP) || X=1;
|
||||||
|
done
|
||||||
|
|
||||||
|
[[ ! $X ]] || (exit 1)
|
||||||
|
Reference in New Issue
Block a user