forked from phalcon/cphalcon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
134 lines (122 loc) · 5.87 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
130
131
132
133
134
version: 3.1.2-{build}
build: false
environment:
matrix:
- PHP_TARGET: 5.6
PHP_VC: 11
PHP_MAJOR: 5
PHP_SDK: c:\projects\php-sdk
PHP_DEVPACK: c:\projects\php-devpack
clone_depth: 1
clone_folder: c:\projects\phalcon
init:
- SET ANSICON=121x90 (121x90)
- SET COMPOSER_NO_INTERACTION=1
- SET PARSER_RELEASE=1.0.1
- SET PARSER_VERSION=1.0.1-232
cache:
- vendor -> composer.json
- composer.phar -> composer.json
os: Windows Server 2012 R2
platform:
- x86
matrix:
fast_finish: true
install:
# ==================================================
- echo Setting PHP version...
# ==================================================
- appveyor DownloadFile http://windows.php.net/downloads/releases/sha1sum.txt
- ps: $env:PHP_VERSION=type sha1sum.txt | where { $_ -match "php-(${env:PHP_TARGET}\.\d+)-src" } | foreach { $matches[1] }
- ps: $env:PARSER_DOWNLOAD_URL="https://github.com/phalcon/php-zephir-parser/releases/download/v${env:PARSER_RELEASE}/zephir_parser_${env:PLATFORM}_vc${env:PHP_VC}_php${env:PHP_TARGET}_${env:PARSER_VERSION}.zip"
# ==================================================
- echo Initializing Build...
# ==================================================
- cd %APPVEYOR_BUILD_FOLDER%
- git submodule update --init --recursive
# ==================================================
- echo Downloading PHP source code [%PHP_VERSION%]
# ==================================================
- ps: (new-object net.webclient).DownloadFile('http://windows.php.net/downloads/releases/php-' + ${env:PHP_VERSION} + '-Win32-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} + '-Win32-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-VC11-%PLATFORM% php-devpack
# ==================================================
- echo Enable Zephir Parser
# ==================================================
- 'cd %APPVEYOR_BUILD_FOLDER%\..\php\ext'
- curl --location --silent --show-error %PARSER_DOWNLOAD_URL% --output zephir_parser.zip
- 7z.exe x zephir_parser.zip | FIND /V "ing "
# ==================================================
- echo Building PHP [%PHP_VERSION%]
# ==================================================
- '%PHP_SDK%\bin\phpsdk_setvars'
- 'cd %APPVEYOR_BUILD_FOLDER%\..\php'
- '"%VS110COMNTOOLS%\VsDevCmd" %PLATFORM%'
- 'echo extension_dir=%APPVEYOR_BUILD_FOLDER%\..\php\ext > php.ini'
- 'echo extension=php_zephir_parser.dll >> php.ini'
- 'echo extension=php_curl.dll >> php.ini'
- 'echo extension=php_openssl.dll >> php.ini'
- 'echo extension=php_mbstring.dll >> php.ini'
- 'echo extension=php_pdo_sqlite.dll >> php.ini'
- 'echo extension=php_fileinfo.dll >> php.ini'
- 'echo extension=php_gettext.dll >> php.ini'
- 'echo extension=php_gd2.dll >> php.ini'
- 'echo extension=c:\php_imagick\php_imagick.dll >> php.ini'
- 'echo memory_limit=256M >> php.ini'
- 'set PATH=%cd%;%PATH%;c:\ImageMagick\bin;c:\php_imagick'
- php --ri "Zephir Parser"
# ==================================================
- echo Setting up the php_imagick
# ==================================================
- mkdir c:\ImageMagick && cd c:\ImageMagick
- ps: (new-object net.webclient).DownloadFile('http://windows.php.net/downloads/pecl/deps/ImageMagick-6.9.3-7-vc11-x86.zip', 'c:\ImageMagick\ImageMagick.zip')
- 7z.exe x ImageMagick.zip | FIND /V "ing "
- mkdir c:\php_imagick && cd c:\php_imagick
- ps: (new-object net.webclient).DownloadFile('http://windows.php.net/downloads/pecl/releases/imagick/3.4.3rc1/php_imagick-3.4.3rc1-5.6-ts-vc11-x86.zip', 'c:\php_imagick\php_imagick.zip')
- 7z.exe x php_imagick.zip | FIND /V "ing "
# ==================================================
- echo Download tests dependencies...
# ==================================================
- cd %APPVEYOR_BUILD_FOLDER%
- if not exist vendor (php -r "readfile('https://getcomposer.org/installer');" | php && php composer.phar --version)
- if not exist vendor (php composer.phar update --quiet --no-ansi --no-interaction --no-progress --optimize-autoloader --dev --prefer-dist --no-suggest --ignore-platform-reqs)
# ==================================================
- echo Download Zephir
# ==================================================
- cd %APPVEYOR_BUILD_FOLDER%
- 'vendor\bin\zephir help'
build_script:
- 'vendor\bin\zephir generate'
- 'php build\gen-build.php'
- 'cd build\php%PHP_MAJOR%\safe'
- '%PHP_DEVPACK%\\phpize'
- configure --enable-phalcon
- nmake
on_finish:
- cd %APPVEYOR_BUILD_FOLDER%
- ps: Push-AppveyorArtifact build\php${env:PHP_MAJOR}\safe\Release_TS\php_phalcon.dll
on_failure :
- 'dir'
- ps: >-
IF (Test-Path -Path compile-errors.log) {
type compile-errors.log
}
IF (Test-Path -Path compile.log) {
type compile.log
}
IF (Test-Path -Path configure.js) {
type configure.js
}