-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
100 lines (90 loc) · 4.22 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
build: false
platform:
- x64
environment:
xdebug: 2.7.0
matrix:
- dependencies: current
php_ver_target: 7.1
vc: vc14
- dependencies: current
php_ver_target: 7.2
vc: vc15
- dependencies: current
php_ver_target: 7.3
vc: vc15
## Set up environment variables
init:
- SET PATH=C:\Program Files\OpenSSL;c:\tools\php;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET PHP=1 # This var is connected to PHP install cache
- SET ANSICON=121x90 (121x90)
## Cache composer, chocolatey and php bits
cache:
#- '%LOCALAPPDATA%\Composer\files -> composer.lock'
#- composer.phar
# Cache chocolatey packages
#- C:\ProgramData\chocolatey\bin -> .appveyor.yml
#- C:\ProgramData\chocolatey\lib -> .appveyor.yml
# Cache php install
#- c:\tools\php -> .appveyor.yml
## Install PHP and composer, and run the appropriate composer command
install:
- IF EXIST c:\tools\php (SET PHP=0) # Checks for the PHP install being cached
# In order to be able to list all the avialable PHP packages we have to
# downgrade Chocolatey to version 0.10.13.
# See https://github.com/chocolatey/choco/issues/1843
- ps: choco install chocolatey -y --version 0.10.13 --allow-downgrade
- appveyor-retry cinst -y curl 7zip
- ps: $env:php_final_ver=((choco search php --exact --all-versions -r | select-string -pattern $env:php_ver_target | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
- ps: echo $env:php_final_ver
- ps: appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y php --version $env:php_final_ver
- cd c:\tools\php
- cd ext
- curl -o php_xdebug-%xdebug%-%php_ver_target%-nts-%vc%-x64.zip https://windows.php.net/downloads/pecl/releases/xdebug/%xdebug%/php_xdebug-%xdebug%-%php_ver_target%-nts-%vc%-x64.zip -A AppVeyor
- 7z e php_xdebug-%xdebug%-%php_ver_target%-nts-%vc%-x64.zip *.dll
- cd ..
- IF %PHP%==1 copy php.ini-production php.ini /Y
- IF %PHP%==1 echo date.timezone="UTC" >> php.ini
- IF %PHP%==1 echo extension_dir=ext >> php.ini
- IF %PHP%==1 echo extension=php_curl.dll >> php.ini
- IF %PHP%==1 echo extension=php_soap.dll >> php.ini
- IF %PHP%==1 echo extension=php_openssl.dll >> php.ini
- IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini
- IF %PHP%==1 echo extension=php_fileinfo.dll >> php.ini
- IF %PHP%==1 echo zend_extension=php_xdebug.dll >> php.ini
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
- appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar
- cd %APPVEYOR_BUILD_FOLDER%
- IF %dependencies%==lowest appveyor-retry composer update --prefer-lowest --no-progress --profile -n
- IF %dependencies%==current appveyor-retry composer install --no-progress --profile -o
- IF %dependencies%==highest appveyor-retry composer update --no-progress --profile -n
- composer show
- xcopy /Y /E /I . c:\tools\app
- xcopy /Y /E /I c:\tools\app %APPVEYOR_BUILD_FOLDER%\artefacts\app
- xcopy /Y /E /I c:\tools\php %APPVEYOR_BUILD_FOLDER%\artefacts\php
- cd %APPVEYOR_BUILD_FOLDER%\artefacts\app
- appveyor-retry composer install --no-progress --profile --no-dev -o
- cd %APPVEYOR_BUILD_FOLDER%\artefacts\php
- del /Q ext\php_xdebug.dll
- del /Q php.ini
- copy php.ini-production php.ini-dist /Y
- echo date.timezone="UTC" >> php.ini-dist
- echo extension_dir=ext >> php.ini-dist
- echo extension=php_curl.dll >> php.ini-dist
- echo extension=php_soap.dll >> php.ini-dist
- echo extension=php_openssl.dll >> php.ini-dist
- echo extension=php_mbstring.dll >> php.ini-dist
- echo extension=php_fileinfo.dll >> php.ini-dist
- copy /Y c:\tools\curl\bin\curl-ca-bundle.crt .\curl-ca-bundle.crt
- echo curl.cainfo=curl-ca-bundle.crt >> php.ini-dist
- cd %APPVEYOR_BUILD_FOLDER%
- IF "%APPVEYOR_REPO_TAG_NAME%"=="" appveyor SetVariable -Name APPVEYOR_REPO_TAG_NAME -Value %APPVEYOR_REPO_BRANCH%-%APPVEYOR_REPO_COMMIT:~0,8%
## Run the actual test
test_script:
- cd %APPVEYOR_BUILD_FOLDER%
- vendor/bin/atoum
artifacts:
- path: artefacts
name: TestWebService-%APPVEYOR_REPO_TAG_NAME%-%PHP_VER_TARGET%
type: zip