forked from phan/phan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
111 lines (81 loc) · 3.43 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
# This tests against the supported versions of Phan 1.x.y (PHP 7.0, 7.1, 7.2)
# The project name is the same as the build id used, e.g. https://www.appveyor.com/docs/environment-variables/
version: '{branch}.{build}'
clone_folder: C:\projects\phan
# Don't include full git history
clone_depth: 1
# Test 32-bit builds
platform: x86
# Test with a given PHP version
# 1. (PHP_VERSION is the only version tested of PHP_EXT_VERSION, and it can only be built with VC_VERSION)
# 2. Also, run tests with a variety of supported php-ast versions. Phan should work properly with php-ast 1.0.1+
environment:
matrix:
# This major release of Phan (2.0) requires php-ast 1.0.1+
- PHP_EXT_VERSION: '7.4'
PHP_VERSION: '7.4.3'
VC_VERSION: 15
PHP_AST_VERSION: 1.0.6
- PHP_EXT_VERSION: '7.3'
PHP_VERSION: '7.3.14'
VC_VERSION: 15
PHP_AST_VERSION: 1.0.4
- PHP_EXT_VERSION: '7.1'
PHP_VERSION: '7.1.33'
VC_VERSION: 14
PHP_AST_VERSION: 1.0.1
PHAN_RUN_INTEGRATION_TEST: 1
- PHP_EXT_VERSION: '7.2'
PHP_VERSION: '7.2.27'
VC_VERSION: 15
PHP_AST_VERSION: 1.0.4
init:
- SET PATH=c:\projects\php;C:\projects\composer;%PATH%
# There are more than one version of php and php-ast that could be installed (for php 7.1 and 7.2),
# so I'm not sure how to cache those.
cache:
- '%LOCALAPPDATA%\Composer\files -> composer.lock'
- 'C:\projects\composer\composer.phar'
branches:
only:
- master
- v2
install:
- cmd: choco feature enable -n=allowGlobalConfirmation
- cmd: mkdir %APPVEYOR_BUILD_FOLDER%\bin
build_script:
- cmd: >-
mkdir C:\projects\php
cd C:\projects\php
SET PHP_ZIP_BASENAME=php-%PHP_VERSION%-nts-Win32-VC%VC_VERSION%-x86.zip
curl -fsS https://windows.php.net/downloads/releases/archives/%PHP_ZIP_BASENAME% -o %PHP_ZIP_BASENAME% || curl -fsS https://windows.php.net/downloads/releases/%PHP_ZIP_BASENAME% -o %PHP_ZIP_BASENAME%
7z x -y %PHP_ZIP_BASENAME%
del /Q *.zip
cd C:\projects\php\ext
SET AST_ZIP_BASENAME=php_ast-%PHP_AST_VERSION%-%PHP_EXT_VERSION%-nts-vc%VC_VERSION%-x86.zip
curl -fsS https://windows.php.net/downloads/pecl/releases/ast/%PHP_AST_VERSION%/%AST_ZIP_BASENAME% -o %AST_ZIP_BASENAME%
7z x %AST_ZIP_BASENAME% php_ast.dll -y >nul
cd C:\projects\php
echo [PHP] > php.ini
echo extension_dir = "ext" >> php.ini
echo extension=php_ast.dll >> php.ini
echo extension=php_curl.dll >> php.ini
echo extension=php_intl.dll >> php.ini
echo extension=php_mbstring.dll >> php.ini
echo extension=php_openssl.dll >> php.ini
echo extension=php_soap.dll >> php.ini
echo %PATH%
php -v
php -m
IF NOT exist "C:\projects\composer\composer.phar" ( curl --create-dirs -fsS https://getcomposer.org/composer.phar -o "C:\projects\composer\composer.phar" )
test_script:
- cmd: cd C:\projects\phan
- cmd: php C:\projects\composer\composer.phar install --classmap-authoritative --prefer-dist
- cmd: php phan --plugin InvokePHPNativeSyntaxCheckPlugin
# Run phpunit tests in parallel on all available processors (2 on appveyor).
# If running this step with Wine or symlinks, then use paratest --phpunit vendor/phpunit/phpunit/phpunit --verbose instead.
- cmd: .\vendor\bin\paratest.bat --processes 2 --phpunit .\vendor\phpunit\phpunit\phpunit
# Verify that a phar can be built and executed under windows
- cmd: mkdir build
- cmd: php -d phar.readonly=0 internal/package.php
- cmd: php build/phan.phar --quick