|
1 |
| -version: 1.1.2-{build} |
| 1 | +version: 1.1.3-{build} |
2 | 2 |
|
3 |
| -#---------------------------------# |
4 |
| -# environment configuration # |
5 |
| -#---------------------------------# |
6 |
| - |
7 |
| -# environment variables |
8 | 3 | environment:
|
9 |
| - matrix: |
10 |
| - - PHP_TARGET: 7.0 |
11 |
| - PHP_VC: 14 |
12 |
| - PHP_MAJOR: 7 |
13 |
| - PHP_BUILD_TYPE: "Win32" |
14 |
| - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 |
15 |
| - - PHP_TARGET: 7.0 |
16 |
| - PHP_VC: 14 |
17 |
| - PHP_MAJOR: 7 |
18 |
| - PHP_BUILD_TYPE: "nts-Win32" |
19 |
| - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 |
20 |
| - - PHP_TARGET: 7.1 |
21 |
| - PHP_VC: 14 |
22 |
| - PHP_MAJOR: 7 |
23 |
| - PHP_BUILD_TYPE: "Win32" |
24 |
| - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 |
25 |
| - - PHP_TARGET: 7.1 |
26 |
| - PHP_VC: 14 |
27 |
| - PHP_MAJOR: 7 |
28 |
| - PHP_BUILD_TYPE: "nts-Win32" |
29 |
| - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 |
30 |
| - - PHP_TARGET: 7.2 |
31 |
| - PHP_VC: 15 |
32 |
| - PHP_MAJOR: 7 |
33 |
| - PHP_BUILD_TYPE: "Win32" |
34 |
| - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 |
35 |
| - - PHP_TARGET: 7.2 |
36 |
| - PHP_VC: 15 |
37 |
| - PHP_MAJOR: 7 |
38 |
| - PHP_BUILD_TYPE: "nts-Win32" |
39 |
| - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 |
40 |
| - PHP_DIR: c:\projects\php |
41 |
| - PHP_SDK: c:\projects\php-sdk |
42 |
| - PHP_DEVPACK: c:\projects\php-devpack |
43 |
| - PHP_SDK_BINARY_TOOLS_VER: php-sdk-2.0.7 |
44 |
| - NO_INTERACTION: 1 |
45 |
| - REPORT_EXIT_STATUS: 1 |
| 4 | + matrix: |
| 5 | + - PHP_MINOR: 7.0 |
| 6 | + VC_VERSION: 14 |
| 7 | + BUILD_TYPE: "Win32" |
| 8 | + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 |
| 9 | + - PHP_MINOR: 7.0 |
| 10 | + VC_VERSION: 14 |
| 11 | + BUILD_TYPE: "nts-Win32" |
| 12 | + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 |
| 13 | + - PHP_MINOR: 7.1 |
| 14 | + VC_VERSION: 14 |
| 15 | + BUILD_TYPE: "Win32" |
| 16 | + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 |
| 17 | + - PHP_MINOR: 7.1 |
| 18 | + VC_VERSION: 14 |
| 19 | + BUILD_TYPE: "nts-Win32" |
| 20 | + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 |
| 21 | + - PHP_MINOR: 7.2 |
| 22 | + VC_VERSION: 15 |
| 23 | + BUILD_TYPE: "Win32" |
| 24 | + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 |
| 25 | + - PHP_MINOR: 7.2 |
| 26 | + VC_VERSION: 15 |
| 27 | + BUILD_TYPE: "nts-Win32" |
| 28 | + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 |
| 29 | + PHP_PATH: C:\Projects\php |
| 30 | + PHP_SDK_PATH: C:\Projects\php-sdk |
| 31 | + DEVPACK_PATH: C:\Projects\php-devpack |
| 32 | + PHP_SDK_VERSION: 2.0.7 |
| 33 | + NO_INTERACTION: 1 |
| 34 | + REPORT_EXIT_STATUS: 1 |
| 35 | + PACKAGE_PREFIX: zephir_parser |
| 36 | + EXTENSION_NAME: "Zephir Parser" |
| 37 | + EXTENSION_FILE: php_zephir_parser.dll |
46 | 38 |
|
47 |
| -# this is how to allow failing jobs in the matrix |
48 | 39 | matrix:
|
49 |
| - # immediately finish build once one of the jobs fails |
50 |
| - fast_finish: true |
51 |
| - |
52 |
| -# clone entire repository history if not defined |
53 |
| -clone_depth: 1 |
| 40 | + fast_finish: true |
54 | 41 |
|
55 |
| -# clone directory |
56 |
| -clone_folder: c:\projects\parser |
| 42 | +cache: |
| 43 | + - 'C:\Downloads -> .appveyor.yml' |
57 | 44 |
|
58 |
| -#---------------------------------# |
59 |
| -# build configuration # |
60 |
| -#---------------------------------# |
| 45 | +clone_depth: 1 |
| 46 | +clone_folder: C:\Projects\php-zephir-parser |
61 | 47 |
|
62 |
| -# build platform, i.e. x86, x64, AnyCPU |
63 | 48 | platform:
|
64 |
| - - x86 |
65 |
| - - x64 |
| 49 | + - x86 |
| 50 | + - x64 |
66 | 51 |
|
67 | 52 | branches:
|
68 |
| - only: |
69 |
| - - master |
70 |
| - - development |
| 53 | + only: |
| 54 | + - master |
| 55 | + - development |
71 | 56 |
|
72 |
| -# scripts that are called at very beginning, before repo cloning |
73 |
| -init: |
74 |
| - - SET PATH=C:\Program Files (x86)\MSBuild\%PHP_VC%.0\Bin;C:\Program Files (x86)\Microsoft Visual Studio %PHP_VC%.0\VC;C:\Program Files (x86)\Microsoft Visual Studio %PHP_VC%.0\VC\bin;%PHP_SDK%\bin;%PHP_DIR%\bin;%PHP_DIR%;%PATH% |
75 |
| - - SET ANSICON=121x90 (121x90) |
76 |
| - # ================================================== |
77 |
| - - echo Setting PHP version... |
78 |
| - # ================================================== |
79 |
| - - appveyor DownloadFile http://windows.php.net/downloads/releases/sha1sum.txt |
80 |
| - - ps: | |
81 |
| - $versions = type sha1sum.txt | where { $_ -match "php-(${env:PHP_TARGET}\.\d+)-src" } | foreach { $matches[1] } |
82 |
| - $version = $versions.Split(' ')[-1] |
83 |
| - $env:PHP_VERSION=${version} |
84 |
| - - cmd: rm sha1sum.txt |
85 |
| - - ps: >- |
86 |
| - If ($env:PHP_VC -eq '14') { |
87 |
| - $env:VSCOMNTOOLS=$env:VS120COMNTOOLS |
88 |
| - } elseif ($env:PHP_VC -eq '15') { |
89 |
| - $env:VSCOMNTOOLS=$env:VS140COMNTOOLS |
90 |
| - } |
91 |
| - - ps: >- |
92 |
| - If ($env:PLATFORM -eq 'x86') { |
93 |
| - $env:ARCH='x86' |
94 |
| - If ($env:PHP_BUILD_TYPE -Match "nts-Win32") { |
95 |
| - $env:RELEASE_FOLDER="Release" |
96 |
| - } Else { |
97 |
| - $env:RELEASE_FOLDER="Release_TS" |
98 |
| - } |
99 |
| - } Else { |
100 |
| - $env:ARCH='x86_amd64' |
101 |
| - If ($env:PHP_BUILD_TYPE -Match "nts-Win32") { |
102 |
| - $env:RELEASE_FOLDER="x64\Release" |
103 |
| - } Else { |
104 |
| - $env:RELEASE_FOLDER="x64\Release_TS" |
105 |
| - } |
106 |
| - } |
107 |
| - - ps: >- |
108 |
| - If ($env:PHP_BUILD_TYPE -Match "nts-Win32") { |
109 |
| - $env:RELEASE_ZIPBALL="zephir_parser_${env:PLATFORM}_vc${env:PHP_VC}_php${env:PHP_TARGET}-nts_${env:APPVEYOR_BUILD_VERSION}" |
110 |
| - } Else { |
111 |
| - $env:RELEASE_ZIPBALL="zephir_parser_${env:PLATFORM}_vc${env:PHP_VC}_php${env:PHP_TARGET}_${env:APPVEYOR_BUILD_VERSION}" |
112 |
| - } |
113 |
| - - ps: $env:DEVEL_PACK_VERSION="${env:PHP_VERSION}-${env:PHP_BUILD_TYPE}-vc${env:PHP_VC}-${env:PLATFORM}" |
114 |
| - |
115 |
| -# scripts that run after cloning repository |
116 | 57 | install:
|
117 |
| - # ================================================== |
118 |
| - # Install PHP SDK binary tools |
119 |
| - # ================================================== |
120 |
| - - ps: (new-object net.webclient).DownloadFile('https://github.com/OSTC/php-sdk-binary-tools/archive/' + ${env:PHP_SDK_BINARY_TOOLS_VER} + '.zip', ${env:APPVEYOR_BUILD_FOLDER} + '\php-sdk-binary-tools-' + ${env:PHP_SDK_BINARY_TOOLS_VER} + '.zip') |
121 |
| - - 7z x -y php-sdk-binary-tools-%PHP_SDK_BINARY_TOOLS_VER%.zip -oC:\projects |
122 |
| - - move C:\projects\php-sdk-binary-tools-%PHP_SDK_BINARY_TOOLS_VER% %PHP_SDK% |
123 |
| - # ================================================== |
124 |
| - # Downloading PHP source code |
125 |
| - # ================================================== |
126 |
| - - ps: (new-object net.webclient).DownloadFile('http://windows.php.net/downloads/releases/php-' + ${env:PHP_VERSION} + '-' + ${env:PHP_BUILD_TYPE} + '-vc' + ${env:PHP_VC} + '-' + ${env:PLATFORM} + '.zip', ${env:APPVEYOR_BUILD_FOLDER} + '\php.zip') |
127 |
| - - 'mkdir %PHP_DIR% && mv php.zip %PHP_DIR%\php.zip && cd %PHP_DIR%' |
128 |
| - - 7z.exe x php.zip | FIND /V "ing " |
129 |
| - # ================================================== |
130 |
| - # Install PHP Dev pack |
131 |
| - # ================================================== |
132 |
| - - ps: (new-object net.webclient).DownloadFile('http://windows.php.net/downloads/releases/php-devel-pack-' + ${env:DEVEL_PACK_VERSION} + '.zip', ${env:APPVEYOR_BUILD_FOLDER} + '\php-dev.zip') |
133 |
| - - cd %APPVEYOR_BUILD_FOLDER% |
134 |
| - - 7z.exe x php-dev.zip | FIND /V "ing " |
135 |
| - - move %APPVEYOR_BUILD_FOLDER%\php-%PHP_VERSION%-devel-VC%PHP_VC%-%PLATFORM% %PHP_DEVPACK% |
| 58 | + - git submodule update --init |
| 59 | + - ps: Import-Module .\.ci\AppVeyor.psm1 |
| 60 | + - ps: AppendSessionPath |
| 61 | + - ps: SetupPhpVersionString |
| 62 | + - ps: EnsureRequiredDirectoriesPresent |
| 63 | + - ps: Ensure7ZipIsInstalled |
| 64 | + - ps: InstallSdk |
| 65 | + - ps: InstallPhp |
| 66 | + - ps: InstallPhpDevPack |
| 67 | + - ps: TuneUpPhp |
136 | 68 |
|
137 |
| -# to run custom scripts instead of automatic MSBuild |
138 | 69 | build_script:
|
139 |
| - # ================================================== |
140 |
| - # Initializing Build... |
141 |
| - # ================================================== |
142 |
| - - cd %APPVEYOR_BUILD_FOLDER% |
143 |
| - - git submodule update --init --recursive |
144 |
| - - '"%VSCOMNTOOLS%\VsDevCmd" %PLATFORM%' |
145 |
| - - '"%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" %ARCH%' |
146 |
| - # ================================================== |
147 |
| - # Build Zephir Parser |
148 |
| - # ================================================== |
149 |
| - - cd %APPVEYOR_BUILD_FOLDER% |
150 |
| - - '%PHP_SDK%\bin\phpsdk_setvars' |
151 |
| - - cmd /c build-win32-php%PHP_MAJOR%.bat |
152 |
| - - '%PHP_DEVPACK%\phpize.bat' |
153 |
| - - configure --disable-all --enable-zephir_parser=shared |
154 |
| - - nmake 2> compile-errors.log 1> compile.log |
155 |
| - - 'cd %PHP_DIR%' |
156 |
| - - 'echo extension_dir=%PHP_DIR%\ext > php.ini' |
157 |
| - - 'echo extension=%APPVEYOR_BUILD_FOLDER%\%RELEASE_FOLDER%\php_zephir_parser.dll >> php.ini' |
158 |
| - - php -v |
159 |
| - - php --ri "Zephir Parser" |
| 70 | + - ps: InitializeBuildVars |
| 71 | + - '"%VSCOMNTOOLS%\VsDevCmd" %PLATFORM%' |
| 72 | + - '"%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" %ARCH%' |
| 73 | + - phpsdk_setvars |
| 74 | + - cmd /c build-win32-php7.bat |
| 75 | + - phpize |
| 76 | + - cmd: 'configure --with-prefix=%PHP_PATH% --with-php-build=%DEVPACK_PATH% --disable-all --enable-zephir_parser=shared' |
| 77 | + - cmd: nmake 2> compile-errors.log 1> compile.log |
| 78 | + - ps: InitializeReleaseVars |
| 79 | + - ps: EnableExtension |
160 | 80 |
|
161 |
| -# scripts to run after build |
162 | 81 | after_build:
|
163 |
| - - cd %APPVEYOR_BUILD_FOLDER% |
164 |
| - - mkdir %APPVEYOR_BUILD_FOLDER%\package |
165 |
| - # ================================================== |
166 |
| - - echo Convert *.md files to *.html |
167 |
| - # ================================================== |
168 |
| - - cinst pandoc |
169 |
| - - pandoc -v |
170 |
| - - cmd: for %%i in (*.md) do pandoc -f markdown -t html5 %%~ni.md > package/%%~ni.html |
171 |
| - # ================================================== |
172 |
| - - echo Collect artifacts and zip |
173 |
| - # ================================================== |
174 |
| - - cd %APPVEYOR_BUILD_FOLDER%\package |
175 |
| - # dll |
176 |
| - - copy %APPVEYOR_BUILD_FOLDER%\%RELEASE_FOLDER%\php_zephir_parser.dll .\ |
177 |
| - # docs |
178 |
| - - 'echo Release date: %DATE% %TIME% > RELEASE.txt' |
179 |
| - - 'echo Release version: %APPVEYOR_BUILD_VERSION% >> RELEASE.txt' |
180 |
| - - 'echo Git commit: %APPVEYOR_REPO_COMMIT% >> RELEASE.txt' |
181 |
| - - 'echo Build type: %PHP_BUILD_TYPE% >> RELEASE.txt' |
182 |
| - - 'echo Platform: %PLATFORM% >> RELEASE.txt' |
183 |
| - - 'echo Target PHP version: %PHP_TARGET% >> RELEASE.txt' |
184 |
| - - 'echo Build worker image: %APPVEYOR_BUILD_WORKER_IMAGE% >> RELEASE.txt' |
185 |
| - - cp %APPVEYOR_BUILD_FOLDER%\LICENSE .\ |
186 |
| - - cp %APPVEYOR_BUILD_FOLDER%\CREDITS .\ |
187 |
| - - cp %APPVEYOR_BUILD_FOLDER%\VERSION .\ |
188 |
| - - cp %APPVEYOR_BUILD_FOLDER%\README.WIN32-BUILD-SYSTEM .\ |
189 |
| - - cp %APPVEYOR_BUILD_FOLDER%\NO_WARRANTY .\ |
190 |
| - - 7z a %RELEASE_ZIPBALL%.zip *.* |
191 |
| - - mv %RELEASE_ZIPBALL%.zip %APPVEYOR_BUILD_FOLDER%\ |
192 |
| - |
193 |
| -#---------------------------------# |
194 |
| -# artifacts configuration # |
195 |
| -#---------------------------------# |
| 82 | + - ps: InstallBuildDependencies |
| 83 | + - ps: PrepareReleasePackage |
196 | 84 |
|
197 | 85 | artifacts:
|
198 |
| - # pushing a single file with environment variable in path and "Deployment name" specified |
199 |
| - - path: '.\$(RELEASE_ZIPBALL).zip' |
200 |
| - type: zip |
201 |
| - name: ZephirParser |
202 |
| - |
203 |
| -#---------------------------------# |
204 |
| -# global handlers # |
205 |
| -#---------------------------------# |
206 |
| - |
207 |
| - |
208 |
| -# If you need to investigate worker on build finish uncomment this |
209 |
| -# to display Remote Desktop connection details and pause the build |
210 |
| -# until a special “lock” file on VM desktop is deleted |
211 |
| -#on_finish: |
212 |
| -# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) |
213 |
| - |
214 |
| -on_success: |
215 |
| - - 'dir' |
| 86 | + - path: '.\$(RELEASE_ZIPBALL).zip' |
| 87 | + type: zip |
| 88 | + name: ZephirParser |
216 | 89 |
|
217 | 90 | on_failure:
|
218 |
| - - 'dir' |
219 |
| - - ps: >- |
220 |
| - If (Test-Path -Path ${env:APPVEYOR_BUILD_FOLDER}\compile-errors.log) { |
221 |
| - type ${env:APPVEYOR_BUILD_FOLDER}\compile-errors.log |
222 |
| - } |
223 |
| -
|
224 |
| - If (Test-Path -Path ${env:APPVEYOR_BUILD_FOLDER}\compile.log) { |
225 |
| - type ${env:APPVEYOR_BUILD_FOLDER}\compile.log |
226 |
| - } |
227 |
| -
|
228 |
| - If (Test-Path -Path ${env:APPVEYOR_BUILD_FOLDER}\configure.js) { |
229 |
| - type ${env:APPVEYOR_BUILD_FOLDER}\configure.js |
230 |
| - } |
231 |
| -
|
232 |
| -notifications: |
233 |
| - - provider: Email |
234 |
| - to: |
235 |
| - |
236 |
| - subject: "Build Zephir Parser [{{status}}]" |
237 |
| - on_build_status_changed: true |
| 91 | + - ps: PrintBuildArtifacts |
| 92 | + - ps: PrintVars |
| 93 | + - ps: PrintDirectoriesContent |
| 94 | + - ps: PrintPhpInfo |
0 commit comments