-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy path.appveyor.yml
130 lines (119 loc) · 4.84 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
version: '0.3.2.{build}'
build: false
environment:
matrix:
- PHP_VERSION: 5.6
PHP_TYPE: "Win32"
- PHP_VERSION: 5.6
PHP_TYPE: "nts-Win32"
- PHP_VERSION: 5.5
PHP_TYPE: "Win32"
- PHP_VERSION: 5.5
PHP_TYPE: "nts-Win32"
PHP_SDK: c:\projects\php-sdk
PHP_DEVPACK: c:\projects\php-devpack
PHP_DEPS: c:\projects\deps
NO_INTERACTION: 1
matrix:
allow_failures:
- platform: x64
clone_folder: c:\projects\extension
os: Windows Server 2012 R2
platform:
- x86
- x64
init:
- SET PATH=C:\Program Files (x86)\MSBuild\%PHP_VC%.0\Bin;%PATH%
- SET PATH=c:\php;c:\projects\php-devpack;%PATH%
- SET PHP=1
- SET ANSICON=121x90 (121x90)
install:
- echo Setting PHP version...
- ps: >-
If ($env:PHP_VERSION -Match "5.6") {
Start-FileDownload 'http://windows.php.net/downloads/releases/sha1sum.txt'
$env:PHP_VERSION=type sha1sum.txt | where { $_ -match "php-(5\.6\.\d+)-src" } | foreach { $matches[1] }
$env:version='{build}-$(PHP_VERSION)'
$env:PHP_VC=11
} elseif ($env:PHP_VERSION -Match "5.5") {
Start-FileDownload 'http://windows.php.net/downloads/releases/sha1sum.txt'
$env:PHP_VERSION=type sha1sum.txt | where { $_ -match "php-(5\.5\.\d+)-src" } | foreach { $matches[1] }
$env:version='{build}-$(PHP_VERSION)'
$env:PHP_VC=11
} elseif ($env:PHP_VERSION -Match "7.0") {
Start-FileDownload 'http://windows.php.net/downloads/releases/sha1sum.txt'
$env:PHP_VERSION=type sha1sum.txt | where { $_ -match "php-(7\.0\.\d+)-src" } | foreach { $matches[1] }
$env:version='{build}-$(PHP_VERSION)'
$env:PHP_VC=14
} Else {
$env:version='{build}-$(PHP_VERSION)'
}
If ($env:PLATFORM -Match "x86") {
If ($env:PHP_TYPE -Match "nts-Win32") {
$env:RELEASE_FOLDER="Release"
} Else {
$env:RELEASE_FOLDER="Release_TS"
}
} else {
If ($env:PHP_TYPE -Match "nts-Win32") {
$env:RELEASE_FOLDER="x64\Release"
} Else {
$env:RELEASE_FOLDER="x64\Release_TS"
}
}
If ($env:PHP_VC -eq '11') {
$env:VSCOMNTOOLS=$env:VS110COMNTOOLS
} elseif ($env:PHP_VC -eq '14') {
$env:VSCOMNTOOLS=$env:VS140COMNTOOLS
}
If ($env:PLATFORM -eq 'x64') {
$env:ARCH='x86_amd64'
} Else {
$env:ARCH='x86'
}
- echo Initializing Build with %PHP_VC% for %ARCH%...
- cd %APPVEYOR_BUILD_FOLDER%
- echo Preparing extension build...
- echo Downloading PHP source code [%PHP_VERSION%]
- echo http://windows.php.net/downloads/releases/php-%PHP_VERSION%-%PHP_TYPE%-VC%PHP_VC%-%PLATFORM%.zip
- ps: (new-object net.webclient).DownloadFile('http://windows.php.net/downloads/releases/php-' + ${env:PHP_VERSION} + '-' + ${env:PHP_TYPE} + '-VC' + ${env:PHP_VC} + '-' + ${env:PLATFORM} + '.zip', ${env:APPVEYOR_BUILD_FOLDER} + '\..\php.zip')
- cd ..
- 'mkdir php && mv php.zip php\php.zip && cd php'
- 7z.exe x php.zip | FIND /V "ing "
- cd ..
- echo Downloading PHP-SDK
- mkdir php-sdk && cd php-sdk
- ps: (new-object net.webclient).DownloadFile('http://windows.php.net/downloads/php-sdk/php-sdk-binary-tools-20110915.zip', ${env:APPVEYOR_BUILD_FOLDER} + '\..\php-sdk.zip')
- '7z.exe x ..\php-sdk.zip | FIND /V "ing "'
- cd ..
- echo Downloading PHP-Devel-Pack
- ps: (new-object net.webclient).DownloadFile('http://windows.php.net/downloads/releases/php-devel-pack-' + ${env:PHP_VERSION} + '-' + ${env:PHP_TYPE} + '-VC' + ${env:PHP_VC} + '-' + ${env:PLATFORM} + '.zip', ${env:APPVEYOR_BUILD_FOLDER} + '\..\php-dev.zip')
- 7z.exe x php-dev.zip | FIND /V "ing "
- mv php-%PHP_VERSION%-devel-VC%PHP_VC%-%PLATFORM% php-devpack
- echo Downloading Cairo deps
- 'mkdir deps && cd deps'
- appveyor DownloadFile http://windows.php.net/downloads/pecl/deps/cairo-1.12.16-vc11-x86.zip
- appveyor DownloadFile http://windows.php.net/downloads/pecl/deps/fontconfig-2.8.0-vc11-x86.zip
- appveyor DownloadFile http://windows.php.net/downloads/php-sdk/deps/vc11/x86/freetype-2.7.0-vc11-x86.zip
- appveyor DownloadFile http://windows.php.net/downloads/php-sdk/deps/vc11/x86/libpng-1.5.26-vc11-x86.zip
- 7z.exe -aos x *.zip | FIND /V "ing "
- echo Building PHP [%PHP_VERSION%]
- '%PHP_SDK%\bin\phpsdk_setvars'
- 'cd %APPVEYOR_BUILD_FOLDER%\..\php'
- 'echo extension_dir=%APPVEYOR_BUILD_FOLDER%\..\php\ext > php.ini'
- 'set PATH=%cd%;%PATH%'
test_script:
- cd c:\projects\extension
- '"C:\\Program Files (x86)\\Microsoft Visual Studio %PHP_VC%.0\\VC\\vcvarsall.bat" %ARCH%'
- Setlocal EnableDelayedExpansion
- phpize
- configure --with-cairo=shared --with-php-build=c:\projects\deps
- nmake 2> compile-errors.log 1>compile.log
- nmake test
on_failure:
- 'dir'
- 'type compile-errors.log'
- 'type compile.log'
- 'type Makefile'
artifacts:
- path: '$(RELEASE_FOLDER)\php_cairo.dll'