Unverified Commit af81c1fd authored by Sergei Morozov's avatar Sergei Morozov Committed by GitHub

Merge pull request #3135 from Majkl578/ci-tweaks

AppVeyor tweaks, retry coverage upload on failure
parents 15a9ef81 ea7666ae
...@@ -10,11 +10,10 @@ cache: ...@@ -10,11 +10,10 @@ cache:
- C:\ProgramData\chocolatey\bin -> .appveyor.yml - C:\ProgramData\chocolatey\bin -> .appveyor.yml
- C:\ProgramData\chocolatey\lib -> .appveyor.yml - C:\ProgramData\chocolatey\lib -> .appveyor.yml
- C:\tools\php -> .appveyor.yml - C:\tools\php -> .appveyor.yml
- composer.phar - C:\tools\cacert -> .appveyor.yml
- ocular.phar - C:\tools\composer -> .appveyor.yml
- cacert.pem - C:\tools\ocular -> .appveyor.yml
- '%LOCALAPPDATA%\Composer\files' - '%LOCALAPPDATA%\Composer\files -> composer.json'
#- vendor
## Build matrix for lowest and highest possible targets ## Build matrix for lowest and highest possible targets
environment: environment:
...@@ -41,7 +40,7 @@ environment: ...@@ -41,7 +40,7 @@ environment:
coverage: yes coverage: yes
init: init:
- SET PATH=C:\Program Files\OpenSSL;c:\tools\php;%PATH% - SET PATH=C:\Program Files\OpenSSL;c:\tools\php;C:\tools\composer;C:\tools\ocular;%PATH%
- SET COMPOSER_NO_INTERACTION=1 - SET COMPOSER_NO_INTERACTION=1
- SET ANSICON=121x90 (121x90) - SET ANSICON=121x90 (121x90)
...@@ -60,12 +59,14 @@ install: ...@@ -60,12 +59,14 @@ install:
copy php.ini-production php.ini copy php.ini-production php.ini
Add-Content php.ini "`n date.timezone=UTC" Add-Content php.ini "`n date.timezone=UTC"
Add-Content php.ini "`n extension_dir=ext" Add-Content php.ini "`n extension_dir=ext"
Add-Content php.ini "`n memory_limit=1G"
Add-Content php.ini "`n extension=php_openssl.dll" Add-Content php.ini "`n extension=php_openssl.dll"
Add-Content php.ini "`n extension=php_mbstring.dll" Add-Content php.ini "`n extension=php_mbstring.dll"
Add-Content php.ini "`n extension=php_fileinfo.dll" Add-Content php.ini "`n extension=php_fileinfo.dll"
Add-Content php.ini "`n extension=php_pdo_sqlite.dll" Add-Content php.ini "`n extension=php_pdo_sqlite.dll"
Add-Content php.ini "`n extension=php_sqlite3.dll" Add-Content php.ini "`n extension=php_sqlite3.dll"
Add-Content php.ini "`n extension=php_curl.dll" Add-Content php.ini "`n extension=php_curl.dll"
Add-Content php.ini "`n curl.cainfo=C:\tools\cacert\bundle.pem"
# Get and install the MSSQL DLL's # Get and install the MSSQL DLL's
$DLLVersion = "5.2.0rc1" $DLLVersion = "5.2.0rc1"
...@@ -89,24 +90,37 @@ install: ...@@ -89,24 +90,37 @@ install:
Add-Content php.ini "`nzend_extension=php_xdebug.dll" Add-Content php.ini "`nzend_extension=php_xdebug.dll"
Add-Content php.ini "`n" Add-Content php.ini "`n"
cd c:\projects\dbal # download Composer
if (!(Test-Path C:\tools\composer)) {
if (!(Test-Path c:\projects\dbal\composer.phar)) { New-Item -path c:\tools -name composer -itemtype directory
appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar }
if (!(Test-Path c:\tools\composer\composer.phar)) {
appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar -Filename C:\tools\composer\composer.phar
Set-Content -path 'C:\tools\composer\composer.bat' -Value ('@php C:\tools\composer\composer.phar %*')
} }
if (!(Test-Path c:\projects\dbal\ocular.phar)) { # download Scrutinizer's Ocular
appveyor-retry appveyor DownloadFile https://github.com/scrutinizer-ci/ocular/releases/download/1.5.2/ocular.phar if (!(Test-Path C:\tools\ocular)) {
New-Item -path c:\tools -name ocular -itemtype directory
}
if (!(Test-Path c:\tools\ocular\ocular.phar)) {
appveyor-retry appveyor DownloadFile https://github.com/scrutinizer-ci/ocular/releases/download/1.5.2/ocular.phar -Filename C:\tools\ocular\ocular.phar
Set-Content -path 'C:\tools\ocular\ocular.bat' -Value ('@php C:\tools\ocular\ocular.phar %*')
} }
if (!(Test-Path c:\projects\dbal\cacert.pem)) { # download CA bundle
appveyor-retry appveyor DownloadFile https://curl.haxx.se/ca/cacert.pem if (!(Test-Path C:\tools\cacert)) {
New-Item -path c:\tools\ -name cacert -itemtype directory
}
if (!(Test-Path c:\tools\cacert\bundle.pem)) {
appveyor-retry appveyor DownloadFile https://curl.haxx.se/ca/cacert.pem -Filename C:\tools\cacert\bundle.pem
} }
} }
# install composer dependencies # install composer dependencies
- cd C:\projects\dbal
- rm composer.lock - rm composer.lock
- appveyor-retry php composer.phar self-update - appveyor-retry composer self-update
- appveyor-retry php composer.phar install --no-progress --profile - appveyor-retry composer install --no-progress --prefer-dist
before_test: before_test:
# Selectively start the services # Selectively start the services
...@@ -127,7 +141,7 @@ test_script: ...@@ -127,7 +141,7 @@ test_script:
- ps: >- - ps: >-
if ($env:coverage -eq "yes") { if ($env:coverage -eq "yes") {
vendor\bin\phpunit -c $($env:phpunit_config) --coverage-clover clover.xml vendor\bin\phpunit -c $($env:phpunit_config) --coverage-clover clover.xml
php.exe -d curl.cainfo=c:\projects\dbal\cacert.pem ocular.phar code-coverage:upload --format=php-clover clover.xml appveyor-retry ocular code-coverage:upload --format=php-clover clover.xml
} else { } else {
vendor\bin\phpunit -c $($env:phpunit_config) vendor\bin\phpunit -c $($env:phpunit_config)
} }
...@@ -46,8 +46,8 @@ script: ...@@ -46,8 +46,8 @@ script:
after_script: after_script:
- | - |
if [ "x$COVERAGE" == "xyes" ]; then if [ "x$COVERAGE" == "xyes" ]; then
wget https://github.com/scrutinizer-ci/ocular/releases/download/1.5.2/ocular.phar travis_retry wget https://github.com/scrutinizer-ci/ocular/releases/download/1.5.2/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover clover.xml travis_retry php ocular.phar code-coverage:upload --format=php-clover clover.xml
fi fi
jobs: jobs:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment