-
Notifications
You must be signed in to change notification settings - Fork 21
/
.appveyor.yml
208 lines (173 loc) · 6.39 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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
#---------------------------------#
# general configuration #
#---------------------------------#
# version format
version: 1.0.{build}-{branch}
# branches to build
branches:
# blacklist
except:
- gh-pages
# Skipping commits affecting specific files (GitHub only). More details here: /docs/appveyor-yml
skip_commits:
# Default `skip` messages are applied even on tag builds with APPVEYOR_IGNORE_COMMIT_FILTERING_ON_TAG==true
message: /\[_skip ci_\]|\[_ci skip_\]|\[_skip_ci_\]|\[_ci_skip_\]/
files:
- README.md
- THIRD_PARTY_NOTICES.md
# - docs/*
# - '**/*.png'
# - '**/*.jpg'
# - '**/*.jpeg'
# - '**/*.bmp'
# - '**/*.gif'
# - '**/*.js'
# - '**/*.txt'
# - '**/*.md'
# Maximum number of concurrent jobs for the project
max_jobs: 1
#---------------------------------#
# environment configuration #
#---------------------------------#
# Build worker image (VM template)
image: Visual Studio 2022
# environment variables
environment:
APPVEYOR_IGNORE_COMMIT_FILTERING_ON_TAG: true
git_user_email: [email protected]
git_user_name: TheQwertiest
GITHUB_TOKEN:
secure: tGGDBtpW74kNoY4PwFw2uuRCj/Npr9kDYaJTdm3IFOcEXA1dr8pc9vgur+6rvaoq
# this is how to allow failing jobs in the matrix
matrix:
fast_finish: true # set this flag to immediately finish build once one of the jobs fails.
cache:
- node_modules # local npm modules
- workspaces\packages -> **\packages.config
# scripts that run after cloning repository
install:
- npm install
# GitHub CLI
- choco install gh -y
- refreshenv
- gh config set -h github.com git_protocol https
# PIP
- py -3 -m pip install semver
# Component
- py -u scripts\setup.py
#---------------------------------#
# build configuration #
#---------------------------------#
# build platform, i.e. x86, x64, Any CPU. This setting is optional.
platform:
- Win32
# build Configuration, i.e. Debug, Release, etc.
configuration:
- Debug
- Release
# Build settings, not to be confused with "before_build" and "after_build".
# "project" is relative to the original build directory and not influenced by directory changes in "before_build".
# build:
# parallel: true # enable MSBuild parallel builds
# project: workspaces\foo_spider_monkey_panel.sln # path to Visual Studio solution or project
#
# # MSBuild verbosity level
# verbosity: normal
# scripts to run before build
before_build:
- nuget restore workspaces\foo_spider_monkey_panel.sln
# to run your custom scripts instead of automatic MSBuild
build_script:
- msbuild "C:\projects\foo-spider-monkey-panel\workspaces\foo_spider_monkey_panel.sln" /m /verbosity:normal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
# scripts to run after build (working directory and environment changes are persisted from the previous steps)
after_build:
- py -u scripts\generate_docs.py
- if '%configuration%' == 'Debug' (
py -u scripts\pack_component.py --debug &&
ren "_result\%platform%_%configuration%\foo_spider_monkey_panel.fb2k-component" "foo_spider_monkey_panel.fb2k-component_debug"
)
else (
py -u scripts\pack_component.py
)
# scripts to run *after* solution is built and *before* automatic packaging occurs (web apps, NuGet packages, Azure Cloud Services)
before_package:
- py -u scripts\generate_docs.py
- if '%configuration%' == 'Debug' (
py -u scripts\pack_component.py --debug &&
ren "_result\%platform%_%configuration%\foo_spider_monkey_panel.fb2k-component" "foo_spider_monkey_panel.fb2k-component_debug"
)
else (
py -u scripts\pack_component.py
)
# to disable automatic builds
#build: off
#---------------------------------#
# artifacts configuration #
#---------------------------------#
artifacts:
# pushing a single file with environment variable in path and "Deployment name" specified
- path: _result\$(platform)_$(configuration)\foo_spider_monkey_panel.fb2k-component
name: SMP package (Release)
- path: _result\$(platform)_$(configuration)\foo_spider_monkey_panel_pdb.zip
name: SMP PDB package (Release)
- path: _result\$(platform)_$(configuration)\foo_spider_monkey_panel.fb2k-component_debug
name: SMP package (Debug)
#---------------------------------#
# deployment configuration #
#---------------------------------#
# providers: Local, FTP, WebDeploy, AzureCS, AzureBlob, S3, NuGet, Environment
# provider names are case-sensitive!
deploy:
description: 'Dummy description'
provider: GitHub
auth_token: $(GITHUB_TOKEN)
artifact: /foo_spider_monkey_panel.*/ # upload all NuGet packages to release assets
prerelease: true
on:
branch: master # release from master branch only
appveyor_repo_tag: true # deploy on tag push only
# scripts to run before deployment
before_deploy:
# scripts to run after deployment
after_deploy:
# to run your custom scripts instead of provider deployments
deploy_script:
# to disable deployment
# deploy: off
#---------------------------------#
# global handlers #
#---------------------------------#
# on successful build
on_success:
# issues clean up
- ps: |
If ($env:APPVEYOR_REPO_TAG -eq $true -and $env:CONFIGURATION -eq "Release")
{
py -u submodules\fb2k_utils\scripts\close_gh_issues.py
}
# gh-pages
- ps: |
If ($env:APPVEYOR_REPO_TAG -eq $true -and $env:CONFIGURATION -eq "Release")
{
git config --global credential.helper store
Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:GITHUB_TOKEN):[email protected]`n"
git config --global user.email $env:git_user_email
git config --global user.name $env:git_user_name
git clone -q --depth=1 -b gh-pages https://github.com/$($env:APPVEYOR_REPO_NAME).git gh-pages
py -u scripts\update_gh_pages.py
cd gh-pages
py -u build_scripts\update_layout.py
py -u build_scripts\generate_third_party.py
git add -A 2>&1
git commit -q -m "Updated documentation: $env:APPVEYOR_REPO_TAG_NAME ($env:APPVEYOR_REPO_COMMIT)"
git push -q origin gh-pages
cd $env:APPVEYOR_BUILD_FOLDER
}
# on build failure
on_failure:
# after build failure or success
on_finish:
#---------------------------------#
# notifications #
#---------------------------------#
notifications: