forked from pmmp/ext-pmmpthread
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
88 lines (57 loc) · 2.62 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
version: '{branch}.{build}'
image: Visual Studio 2017
environment:
PHP_SDK_BINARY_TOOLS_VER: php-sdk-2.1.1
matrix:
- ARCH: x86
PHP_VER: 7.2
VC_VER: vc15
- ARCH: x64
PHP_VER: 7.2
VC_VER: vc15
- ARCH: x86
PHP_VER: 7.3
VC_VER: vc15
- ARCH: x64
PHP_VER: 7.3
VC_VER: vc15
install:
- cmd: cinst wget
build_script:
- cmd: >-
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %ARCH%
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
7z x -y php-sdk-binary-tools-%PHP_SDK_BINARY_TOOLS_VER%.zip -oC:\projects
move C:\projects\php-sdk-binary-tools-%PHP_SDK_BINARY_TOOLS_VER% C:\projects\php-sdk
C:\projects\php-sdk\bin\phpsdk_setvars.bat
git clone https://github.com/php/php-src C:\projects\php-src -b PHP-%PHP_VER% --depth=1
mkdir C:\projects\php-src\ext\pthreads
xcopy C:\projects\pthreads C:\projects\php-src\ext\pthreads /s /e /y /q
phpsdk_deps -u -t %VC_VER% -b %PHP_VER% -a %ARCH% -f -d C:\projects\php-src\deps
wget http://www.mirrorservice.org/sites/sources.redhat.com/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip -q
7z x -y pthreads-w32-2-9-1-release.zip -oC:\projects\pthreads-w32
copy C:\projects\pthreads-w32\Pre-built.2\include\pthread.h C:\projects\php-src\deps\include\pthread.h
copy C:\projects\pthreads-w32\Pre-built.2\include\sched.h C:\projects\php-src\deps\include\sched.h
copy C:\projects\pthreads-w32\Pre-built.2\include\semaphore.h C:\projects\php-src\deps\include\semaphore.h
copy C:\projects\pthreads-w32\Pre-built.2\lib\%ARCH%\pthreadVC2.lib C:\projects\php-src\deps\lib\pthreadVC2.lib
cd C:\projects\php-src
buildconf.bat
configure.bat --disable-all --enable-cli --enable-zts --with-pthreads=shared --with-prefix=C:\projects\pthreads\bin --with-php-build=deps --enable-ipv6
nmake
nmake install
cd C:\projects\pthreads\bin
copy C:\projects\pthreads-w32\Pre-built.2\dll\%ARCH%\pthreadVC2.dll C:\projects\pthreads\bin\pthreadVC2.dll
echo [PHP] > php.ini
echo extension_dir = "ext" >> php.ini
echo extension=php_pthreads.dll >> php.ini
set TEST_PHP_EXECUTABLE=%cd%\php.exe
php -v
php -m
test_script:
- cmd: >-
set REPORT_EXIT_STATUS=1
php.exe /projects/php-src/run-tests.php /projects/php-src/ext/pthreads -q --show-diff --offline
artifacts:
- path: bin
name: master
type: zip