xref: /ext-ds/appveyor.yml (revision 54432fd4)
1version: '{branch}.{build}'
2
3branches:
4  only:
5  - master
6
7image: Visual Studio 2017
8
9clone_folder: c:\projects\php-ds
10
11environment:
12  PHP_SDK_BINARY_TOOLS_VER: php-sdk-2.1.1
13
14  matrix:
15    - ARCH: x86
16      INT_SIZE: 32
17      PHP_VER: 8.3
18      VC_VER: vc15
19      ZTS: --enable-zts
20    - ARCH: x64
21      INT_SIZE: 64
22      PHP_VER: 8.3
23      VC_VER: vc15
24      ZTS: --enable-zts
25    - ARCH: x86
26      INT_SIZE: 32
27      PHP_VER: 8.3
28      VC_VER: vc15
29      ZTS: --disable-zts
30    - ARCH: x64
31      INT_SIZE: 64
32      PHP_VER: 8.3
33      VC_VER: vc15
34      ZTS: --disable-zts
35
36install:
37- cmd: choco feature enable -n=allowGlobalConfirmation
38- cmd: cinst wget
39- cmd: mkdir C:\projects\php-ds\bin
40- cmd: cd C:\projects\php-ds\bin && appveyor DownloadFile https://getcomposer.org/composer.phar
41
42build_script:
43- cmd: >-
44    "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %ARCH%
45
46    wget https://github.com/OSTC/php-sdk-binary-tools/archive/%PHP_SDK_BINARY_TOOLS_VER%.zip --no-check-certificate -q -O php-sdk-binary-tools-%PHP_SDK_BINARY_TOOLS_VER%.zip
47
48    7z x -y php-sdk-binary-tools-%PHP_SDK_BINARY_TOOLS_VER%.zip -oC:\projects
49
50    move C:\projects\php-sdk-binary-tools-%PHP_SDK_BINARY_TOOLS_VER% C:\projects\php-sdk
51
52    C:\projects\php-sdk\bin\phpsdk_setvars.bat
53
54    git clone https://github.com/php/php-src C:\projects\php-src -b PHP-%PHP_VER% --depth=1
55
56    mkdir C:\projects\php-src\ext\ds
57
58    xcopy C:\projects\php-ds C:\projects\php-src\ext\ds /s /e /y /q
59
60    phpsdk_deps -u -t %VC_VER% -b %PHP_VER% -a %ARCH% -f -d C:\projects\php-src\deps
61
62    cd C:\projects\php-src
63
64    buildconf.bat
65
66    cscript /nologo configure.js --disable-all --enable-cli --enable-cgi %ZTS% --with-openssl --enable-ds=shared --enable-phar --with-prefix=C:\projects\php-ds\bin --with-php-build=deps --with-config-file-scan-dir=C:\projects\php-ds\bin\modules.d --enable-bcmath --enable-calendar --enable-ctype --enable-filter --enable-hash --with-mhash --with-iconv --enable-json --enable-mbstring --with-readline --enable-session --enable-soap=shared --enable-tokenizer --enable-zip --enable-zlib --with-libxml --with-dom --with-simplexml --with-xml --with-wddx --enable-xmlreader --enable-xmlwriter
67
68    nmake
69
70    nmake install
71
72    copy php.ini-development C:\projects\php-ds\bin\php.ini
73
74    mkdir C:\projects\php-ds\bin\modules.d
75
76    echo extension=php_ds.dll >> C:\projects\php-ds\bin\modules.d\php.ini
77
78    echo extension=php_openssl.dll >> C:\projects\php-ds\bin\modules.d\php.ini
79
80    echo extension=php_soap.dll >> C:\projects\php-ds\bin\modules.d\php.ini
81
82    cd C:\projects\php-ds\bin
83
84    set TEST_PHP_EXECUTABLE=%cd%\php.exe
85
86    php -v
87
88    php -m
89
90test_script:
91- cmd: cd C:\projects\php-ds
92- cmd: C:\projects\php-ds\bin\php.exe C:\projects\php-ds\bin\composer.phar update --prefer-source
93- cmd: C:\projects\php-ds\bin\php.exe test.php > test.txt
94- cmd: type test.txt
95- cmd: cd C:\projects\php-ds\bin
96- cmd: php.exe /projects/php-src/run-tests.php /projects/php-src/ext/ds -q --show-diff
97
98artifacts:
99  - path: bin
100    name: master
101    type: zip
102