-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathappveyor.yml
187 lines (169 loc) · 7.55 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
version: 1.0.0.{build}
environment:
# APPVEYOR_RDP_PASSWORD: What1swrongwithyou
matrix:
- job_name: PHP 8.1
PLATFORM: x64
MG_REL_SUFFIX: php81
COMPOSER: composer.json
PHP_COMPOSER_VER: 2.5.8
PHP_DIST_NAME: php-8.1.17-nts-Win32-vs16-x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 # We only care that it's Windows
- job_name: PHP 5.6
PLATFORM: x64
MG_REL_SUFFIX: php56
COMPOSER: composer.php5.json
PHP_COMPOSER_VER: 2.2.21
PHP_DIST_NAME: php-5.6.40-nts-Win32-VC11-x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 # We only care that it's Windows
matrix:
fast_finish: true
build: false
shallow_clone: true
platform:
- x64
clone_folder: c:\projects\mapguide-rest
cache:
- '%LOCALAPPDATA%\Composer\files'
branches:
only:
- master
for:
# ======================================
# PHP 5.6
# ======================================
-
matrix:
only:
- job_name: PHP 5.6
#init:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
install:
- choco install vcredist-all
- echo PLATFORM %PLATFORM%
- echo MG_REL_SUFFIX %MG_REL_SUFFIX%
- echo COMPOSER %COMPOSER%
- echo PHP_COMPOSER_VER %PHP_COMPOSER_VER%
- echo PHP_DIST_NAME %PHP_DIST_NAME%
- echo APPVEYOR_PROJECT_NAME %APPVEYOR_PROJECT_NAME%
- echo APPVEYOR_PROJECT_SLUG %APPVEYOR_PROJECT_SLUG%
- echo APPVEYOR_BUILD_FOLDER %APPVEYOR_BUILD_FOLDER%
- echo APPVEYOR_BUILD_ID %APPVEYOR_BUILD_ID%
- echo APPVEYOR_BUILD_NUMBER %APPVEYOR_BUILD_NUMBER%
- echo APPVEYOR_BUILD_VERSION %APPVEYOR_BUILD_VERSION%
- echo APPVEYOR_REPO_NAME %APPVEYOR_REPO_NAME%
- echo APPVEYOR_REPO_BRANCH %APPVEYOR_REPO_BRANCH%
- echo APPVEYOR_REPO_TAG %APPVEYOR_REPO_TAG%
- echo APPVEYOR_REPO_TAG_NAME %APPVEYOR_REPO_TAG_NAME%
- echo APPVEYOR_REPO_COMMIT %APPVEYOR_REPO_COMMIT%
- echo APPVEYOR_REPO_COMMIT_TIMESTAMP %APPVEYOR_REPO_COMMIT_TIMESTAMP%
- SET PATH=c:\php;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET PHP=1
- IF EXIST c:\php (SET PHP=0) ELSE (mkdir c:\php)
- cd c:\php
- IF %PHP%==1 curl -fksSL -o %PHP_DIST_NAME%.zip https://windows.php.net/downloads/releases/archives/%PHP_DIST_NAME%.zip
- IF %PHP%==1 7z x %PHP_DIST_NAME%.zip -y >nul
- IF %PHP%==1 del /Q *.zip
- IF %PHP%==1 copy /Y php.ini-development php.ini
- IF %PHP%==1 echo max_execution_time=1200 >> php.ini
- IF %PHP%==1 echo date.timezone="UTC" >> php.ini
- IF %PHP%==1 echo extension_dir=ext >> php.ini
- IF %PHP%==1 echo extension=php_openssl.dll >> php.ini
- IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini
- IF %PHP%==1 echo extension=php_curl.dll >> php.ini
- IF %PHP%==1 echo extension=php_gd2.dll >> php.ini
- IF %PHP%==1 echo extension=php_xsl.dll >> php.ini
- SET ARTIFACT_RELEASE_LABEL=%APPVEYOR_BUILD_VERSION%
- IF "%APPVEYOR_REPO_TAG%" == "true" SET ARTIFACT_RELEASE_LABEL=%APPVEYOR_REPO_TAG_NAME%
- cd c:\projects\mapguide-rest
- curl -fksSL -o composer.phar https://getcomposer.org/download/%PHP_COMPOSER_VER%/composer.phar
- php -v
- php composer.phar install --prefer-source --no-progress --ansi
test_script:
- vendor\bin\parallel-lint.bat -s -e php,phpt --exclude vendor .
- vendor\bin\phpunit test
after_test:
- vendor\bin\phing -Dapp.version=%ARTIFACT_RELEASE_LABEL%-%MG_REL_SUFFIX% -f build.phing.xml dist
artifacts:
- path: .\dist\mapguide-rest-$(ARTIFACT_RELEASE_LABEL)-$(MG_REL_SUFFIX).zip
name: dist_php56
type: zip
deploy:
release: $(appveyor_repo_tag_name)
description: 'Release $(appveyor_repo_tag_name) ($(appveyor_build_version))'
provider: GitHub
auth_token:
secure: Dw0UkS+M9jDa7xofORbKLKgTBWZsBTN56QA7xD7F0pCCdNqnLH3K5oFk3smWjRfX
artifact: dist_php56
draft: true
prerelease: true
on:
branch: master # release from master branch only
appveyor_repo_tag: true # deploy on tag push only
#on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# ======================================
# PHP 8.1
# ======================================
-
matrix:
only:
- job_name: PHP 8.1
install:
- echo PLATFORM %PLATFORM%
- echo MG_REL_SUFFIX %MG_REL_SUFFIX%
- echo COMPOSER %COMPOSER%
- echo PHP_COMPOSER_VER %PHP_COMPOSER_VER%
- echo PHP_DIST_NAME %PHP_DIST_NAME%
- echo APPVEYOR_PROJECT_NAME %APPVEYOR_PROJECT_NAME%
- echo APPVEYOR_PROJECT_SLUG %APPVEYOR_PROJECT_SLUG%
- echo APPVEYOR_BUILD_FOLDER %APPVEYOR_BUILD_FOLDER%
- echo APPVEYOR_BUILD_ID %APPVEYOR_BUILD_ID%
- echo APPVEYOR_BUILD_NUMBER %APPVEYOR_BUILD_NUMBER%
- echo APPVEYOR_BUILD_VERSION %APPVEYOR_BUILD_VERSION%
- echo APPVEYOR_REPO_NAME %APPVEYOR_REPO_NAME%
- echo APPVEYOR_REPO_BRANCH %APPVEYOR_REPO_BRANCH%
- echo APPVEYOR_REPO_TAG %APPVEYOR_REPO_TAG%
- echo APPVEYOR_REPO_TAG_NAME %APPVEYOR_REPO_TAG_NAME%
- echo APPVEYOR_REPO_COMMIT %APPVEYOR_REPO_COMMIT%
- echo APPVEYOR_REPO_COMMIT_TIMESTAMP %APPVEYOR_REPO_COMMIT_TIMESTAMP%
- SET PATH=c:\php;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET PHP=1
- IF EXIST c:\php (SET PHP=0) ELSE (mkdir c:\php)
- cd c:\php
- IF %PHP%==1 curl -fksSL -o %PHP_DIST_NAME%.zip https://windows.php.net/downloads/releases/archives/%PHP_DIST_NAME%.zip
- IF %PHP%==1 7z x %PHP_DIST_NAME%.zip -y >nul
- IF %PHP%==1 del /Q *.zip
- IF %PHP%==1 copy /Y php.ini-development php.ini
- IF %PHP%==1 echo extension=openssl >> php.ini
- IF %PHP%==1 echo extension=curl >> php.ini
- IF %PHP%==1 echo extension=mbstring >> php.ini
- SET ARTIFACT_RELEASE_LABEL=%APPVEYOR_BUILD_VERSION%
- IF "%APPVEYOR_REPO_TAG%" == "true" SET ARTIFACT_RELEASE_LABEL=%APPVEYOR_REPO_TAG_NAME%
- cd c:\projects\mapguide-rest
- curl -fksSL -o composer.phar https://getcomposer.org/download/%PHP_COMPOSER_VER%/composer.phar
- php -v
- php composer.phar install --prefer-source --no-progress --ansi
test_script:
- vendor\bin\parallel-lint.bat -s -e php,phpt --exclude vendor .
- vendor\bin\phpunit test
after_test:
- vendor\bin\phing -Dapp.version=%ARTIFACT_RELEASE_LABEL%-%MG_REL_SUFFIX% -f build.phing.xml dist
artifacts:
- path: .\dist\mapguide-rest-$(ARTIFACT_RELEASE_LABEL)-$(MG_REL_SUFFIX).zip
name: dist_php81
type: zip
deploy:
release: $(appveyor_repo_tag_name)
description: 'Release $(appveyor_repo_tag_name) ($(appveyor_build_version))'
provider: GitHub
auth_token:
secure: Dw0UkS+M9jDa7xofORbKLKgTBWZsBTN56QA7xD7F0pCCdNqnLH3K5oFk3smWjRfX
artifact: dist_php81
draft: true
prerelease: true
on:
branch: master # release from master branch only
appveyor_repo_tag: true # deploy on tag push only