-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
appveyor.yml
105 lines (95 loc) · 4.56 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
101
102
103
104
105
build: false
platform:
- x64
environment:
win32service: 1.0.1
matrix:
# - dependencies: current
# php_ver_target: 7.1
# vc: vc14
# xdebug: 2.8.1
# - dependencies: current
# php_ver_target: 7.2
# vc: vc15
# xdebug: 2.9.6
# - dependencies: current
# php_ver_target: 7.3
# vc: vc15
# xdebug: 2.9.6
# - dependencies: current
# php_ver_target: 7.4
# vc: vc15
# xdebug: 2.9.6
- dependencies: current
php_ver_target: 8.0
vc: vs16
xdebug: 3.1.5
- dependencies: current
php_ver_target: 8.1
vc: vs16
xdebug: 3.1.5
## 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
# - mkdir c:\tools\php
# - cd c:\tools\php
# - echo https://windows.php.net/downloads/qa/php-%php_ver_target%-Win32-%vc%-x64.zip
# - curl -o php.zip https://windows.php.net/downloads/qa/php-%php_ver_target%-Win32-%vc%-x64.zip
# - 7z x php.zip
# - cd ext
# - echo https://github.com/win32service/win32service/releases/download/%win32service%/php_win32service-%win32service%-8.0.zip
# - curl -L -o win32service.zip https://github.com/win32service/win32service/releases/download/%win32service%/php_win32service-%win32service%-8.0.zip
# - 7z e win32service.zip *.dll
# - move php_win32service-8.0-ts-vs16-x64.dll php_win32service.dll
# - echo https://xdebug.org/files/php_xdebug-%xdebug%-8.0-%vc%-x86_64.dll
# - curl -L -o php_xdebug.dll https://xdebug.org/files/php_xdebug-%xdebug%-8.0-%vc%-x86_64.dll
- 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
- echo https://windows.php.net/downloads/pecl/releases/win32service/%win32service%/php_win32service-%win32service%-%php_ver_target%-nts-%vc%-x64.zip
- curl -o php_win32service-%win32service%-%php_ver_target%-nts-%vc%-x64.zip https://windows.php.net/downloads/pecl/releases/win32service/%win32service%/php_win32service-%win32service%-%php_ver_target%-nts-%vc%-x64.zip -A AppVeyor
- 7z e php_win32service-%win32service%-%php_ver_target%-nts-%vc%-x64.zip *.dll
# - 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_openssl.dll >> php.ini
- IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini
- IF %PHP%==1 echo extension=php_win32service.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
- IF %dependencies%==highest appveyor-retry composer update --no-progress --profile -n
- composer show
## Run the actual test
test_script:
- cd %APPVEYOR_BUILD_FOLDER%
- vendor/bin/atoum