generated from jasny/skeleton-php-ext
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
129 lines (105 loc) · 3.31 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
# See /~https://github.com/sergeyklay/php-appveyor
branches:
only:
- master
- appveyor
- w32
image: Visual Studio 2015
environment:
EXTNAME: tinyexpression
matrix:
- PHP_VERSION: 7.2
VC_VERSION: vc15
BUILD_TYPE: Win32
- PHP_VERSION: 7.2
VC_VERSION: vc15
BUILD_TYPE: nts-Win32
- PHP_VERSION: 7.3
VC_VERSION: vc15
BUILD_TYPE: Win32
- PHP_VERSION: 7.3
VC_VERSION: vc15
BUILD_TYPE: nts-Win32
- PHP_VERSION: 7.4
VC_VERSION: vc15
BUILD_TYPE: Win32
- PHP_VERSION: 7.4
VC_VERSION: vc15
BUILD_TYPE: nts-Win32
PHP_SDK_VERSION: 2.2.0
TEST_PHP_EXECUTABLE: C:\php\php.exe
NO_INTERACTION: 1
REPORT_EXIT_STATUS: 1
matrix:
fast_finish: true
cache:
- 'C:\Downloads -> .appveyor.yml'
platform:
- x86
- x64
init:
- ps: $DebugPreference = 'SilentlyContinue' # Continue
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "true") {
Update-AppveyorBuild -Version "$($Env:APPVEYOR_REPO_TAG_NAME.TrimStart("v"))"
} else {
Update-AppveyorBuild -Version "${Env:APPVEYOR_REPO_BRANCH}-$($Env:APPVEYOR_REPO_COMMIT.Substring(0, 7))"
}
install:
- ps: Import-Module .\.ci\php-appveyor.psm1
- ps: InstallPhpSdk $Env:PHP_SDK_VERSION $Env:VC_VERSION $Env:PLATFORM
- ps: InstallPhp $Env:PHP_VERSION $Env:BUILD_TYPE $Env:VC_VERSION $Env:PLATFORM
- ps: InstallPhpDevPack $Env:PHP_VERSION $Env:BUILD_TYPE $Env:VC_VERSION $Env:PLATFORM
build_script:
- ps: Import-Module .\.ci\appveyor.psm1
- ps: InitializeBuildVars
- cmd: '"%VSCOMNTOOLS%\VsDevCmd" -arch=%PLATFORM%'
- cmd: '"%VCVARSALL_FILE%" %ARCH%'
- cmd: C:\php-sdk\bin\phpsdk_setvars
- cmd: C:\php-devpack\phpize
- cmd: configure.bat --with-prefix=C:\php --with-php-build=C:\php-devpack --disable-all %ENABLE_EXT%
- cmd: nmake 2> compile-errors.log 1> compile.log
- ps: InitializeReleaseVars
test_script:
- cmd: nmake test
after_build:
- ps: Set-Location "${Env:APPVEYOR_BUILD_FOLDER}"
- ps: >-
PrepareReleasePackage `
-PhpVersion $Env:PHP_VERSION `
-BuildType $Env:BUILD_TYPE `
-Platform $Env:PLATFORM `
-ConverMdToHtml $true `
-ReleaseFiles "${Env:RELEASE_FOLDER}\php_${Env:EXTNAME}.dll",`
"${Env:APPVEYOR_BUILD_FOLDER}\CREDITS",`
"${Env:APPVEYOR_BUILD_FOLDER}\LICENSE"
on_failure :
- ps: >-
If (Test-Path -Path "${Env:APPVEYOR_BUILD_FOLDER}\compile-errors.log") {
Get-Content -Path "${Env:APPVEYOR_BUILD_FOLDER}\compile-errors.log"
}
If (Test-Path -Path "${Env:APPVEYOR_BUILD_FOLDER}\compile.log") {
Get-Content -Path "${Env:APPVEYOR_BUILD_FOLDER}\compile.log"
}
Get-ChildItem "${Env:APPVEYOR_BUILD_FOLDER}\tests" -Recurse -Filter *.diff | Foreach-Object {
[Environment]::NewLine
Write-Output $_.FullName
Get-Content -Path $_.FullName
}
artifacts:
- path: '.\$(RELEASE_ZIPBALL).zip'
name: '$(EXTNAME)'
type: zip
deploy:
release: v$(appveyor_build_version)
description: 'v$(appveyor_build_version)'
provider: GitHub
auth_token:
secure: j1Jbh1qfzjuoSHUDSY8wtR950kzgdnQwvKXjmpk+sQs5Ho49QI6PdC2EDqECCrqe
artifact: '$(RELEASE_ZIPBALL).zip'
draft: false
prerelease: true
force_update: true
on:
branch: master
APPVEYOR_REPO_TAG: true