forked from zephir-lang/zephir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
78 lines (71 loc) · 2.95 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
environment:
matrix:
- PHP_VERSION: latest
PHP_DEP_VER: 5.6
BUILD_PLATFORM: x86
PHP_VC: 11
PHP_SDK: c:\projects\php-sdk
PHP_DEVPACK: c:\projects\php-devpack
cache:
- vendor -> composer.json
os: Windows Server 2012
clone_folder: c:\projects\zephir
matrix:
fast_finish: true
install:
- echo Setting PHP version...
- ps: >-
If ($env:PHP_VERSION -Match "latest") {
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)'
} Else {
$env:version='{build}-$(PHP_VERSION)'
}
- echo Initializing Build...
- cd %APPVEYOR_BUILD_FOLDER%
- git submodule update --init --recursive
- echo Preparing zephir win32 build...
- 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:BUILD_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:BUILD_PLATFORM} + '.zip', ${env:APPVEYOR_BUILD_FOLDER} + '\..\php-dev.zip')
- 7z.exe x php-dev.zip | FIND /V "ing "
- mv php-%PHP_VERSION%-devel-VC11-%BUILD_PLATFORM% php-devpack
- echo Building Zephir Parser
- cd %APPVEYOR_BUILD_FOLDER%
- 'cd parser/parser'
- 'copy %PHP_SDK%\bin\re2c.exe .\re2c.exe'
- '"%VS110COMNTOOLS%\VsDevCmd" %BUILD_PLATFORM%'
- 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'
- 'echo extension=%APPVEYOR_BUILD_FOLDER%\ext\Release_TS\php_test.dll >> php.ini'
- 'echo extension=php_openssl.dll >> php.ini'
- 'echo extension=php_pdo_sqlite.dll >> php.ini'
- 'echo extension=php_gmp.dll >> php.ini'
- 'set PATH=%cd%;%PATH%'
- echo Building Zephir
- cd %APPVEYOR_BUILD_FOLDER%
- if not exist vendor (php -r "readfile('https://getcomposer.org/installer');" | php & php composer.phar --prefer-source install)
build_script:
- 'bin\zephir build'
- 'type compile-errors.log'
- 'type compile.log'
- 'php vendor\phpunit\phpunit\phpunit.php --debug'
on_failure :
- 'dir'
- 'type compile-errors.log'
- 'type compile.log'
artifacts:
- path: parser\Release\php_zephir_parser.dll