forked from EventGhost/EventGhost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
229 lines (184 loc) · 8.4 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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
# In AppVeyor's web config add an enviremont variable named GITHUB_TOKEN.
# Set it to a token you've created on GitHub.
# To draft a release on GitHub with AppVeyor, create a tag on master.
version: '{build}-{branch}'
#init:
# # Enable Remotedesktop and pause the build execution
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
environment:
PYTHON: 'C:\Stackless27'
PYTHONPATH: 'C:\Stackless27;C:\Stackless27\Scripts;C:\Stackless27\DLLs;C:\Stackless27\Lib;C:\Stackless27\Lib\site-packages;'
matrix:
fast_finish: true
cache:
# Invalidate cache if .appveyor.yml has changed
- C:\Stackless27 -> .appveyor.yml
# Manually clear cache:
# from agithub.AppVeyor import AppVeyor
# ci = AppVeyor(<your appveyor API token>)
# status, data = ci.api.projects.<appveyor username>.<appveyor projectname>.buildcache.delete()
# print status # 204 = Ok, cache deleted
install:
# HTML Help Workshop 1.32
# - cinst html-help-workshop
# Microsoft Visual C++ Redistributable 2008 (version min: 9.0.21022.8)
# - cinst vcredist2008
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
- ps: |
$Env:PATH = $Env:PATH -replace "Python27", "Stackless27"
$PythonFolder = $Env:PYTHON
$PythonScripts = $PythonFolder + "\Scripts"
$SitePackages = $PythonFolder + "\lib\site-packages"
$SysWOW = $Env:SYSTEMROOT + "\SysWOW64"
$PythonWindowsDLL = $SysWOW + "\python27.dll"
$PythonDLL = $PythonFolder + "\python27.dll"
$InstallersFolder = $Env:APPVEYOR_BUILD_FOLDER + "\_build\installers\"
Remove-Item $PythonWindowsDLL
New-Item $InstallersFolder -type directory | Out-Null
" "
"=============== prepare EventGhost build environment ==============="
If (-not (Test-Path $PythonFolder))
{
Function PipInstall ($msg, $mod)
{
" "
"--- " + $msg
" Installing..."
pip install -q $mod
" Done."
}
" "
"--- Stackless 2.7.12150 x86"
$StacklessInstaller = $InstallersFolder + "python-2.7.12150-stackless.msi"
$StacklessInstallDir = "TARGETDIR=" + $PythonFolder
$StacklessURL = "http://www.stackless.com/binaries/python-2.7.12150-stackless.msi"
Start-FileDownload $StacklessURL -Timeout 60000 -FileName $StacklessInstaller
" Installing..."
Start-Process MsiExec.exe -Arg "/I $StacklessInstaller /quiet /passive /qn /norestart $StacklessInstallDir" -Wait
" Done."
" "
"--- wxPython 3.0.2.0"
$WXInstaller = $InstallersFolder + "wxPython3.0-win32-3.0.2.0-py27.exe"
$WXURL = "http://downloads.sourceforge.net/wxpython/wxPython3.0-win32-3.0.2.0-py27.exe"
Start-FileDownload $WXURL -Timeout 60000 -FileName $WXInstaller
" Installing..."
Start-Process $WXInstaller -Arg "/VERYSILENT /SUPPRESSMSGBOXES" -NoNewWindow -Wait
" Done."
" "
"--- pip 9.0.1"
" Updating..."
python -m pip install --no-cache-dir -q -U "pip==9.0.1"
" Done."
" "
"--- setuptools 34.3.0"
" Updating..."
pip install -q -U "setuptools==34.3.0"
" Done."
PipInstall "wheel 0.29.0" "wheel==0.29.0"
PipInstall "sphinx 1.7.5" "sphinx==1.7.5"
PipInstall "commonmark 0.7.3" "commonmark==0.7.3"
PipInstall "pillow 3.4.2" "pillow==3.4.2"
PipInstall "py2exe 0.6.9" "py2exe_py2==0.6.9"
PipInstall "pycrypto 2.6.1" "pycrypto==2.6.1"
PipInstall "comtypes 1.1.3" "https://github.com/enthought/comtypes/archive/1.1.3.zip"
PipInstall "ctypeslib 0.5.6" "svn+http://svn.python.org/projects/ctypes/trunk/ctypeslib/#ctypeslib=0.5.6"
PipInstall "paramiko 2.2.1" "paramiko==2.2.1"
PipInstall "pywin32 223" pywin32==223
}
" "
"--- pywin32 post install"
$PywinPostInstall = $PythonScripts +"\pywin32_postinstall.py"
Start-Process python -Arg "$PywinPostInstall -install -silent -quiet" -Wait
" Done."
" "
"--- Inno Setup 5.6.1"
$InnoInstaller = $InstallersFolder + "innosetup-5.6.1-unicode.exe"
$InnoURL = "http://files.jrsoftware.org/is/5/innosetup-5.6.1-unicode.exe"
Start-FileDownload $InnoURL -Timeout 60000 -FileName $InnoInstaller | ForEach-Object { Write-Host " " + $_ }
" Installing..."
Start-Process $InnoInstaller -Arg "/SP /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /RESTARTAPPLICATIONS /NOICONS" -NoNewWindow -Wait
" Done."
" "
" "
"=============== start the EventGhost build ==============="
" "
If ($Env:APPVEYOR_REPO_TAG.tolower() -eq "true" -and
$Env:APPVEYOR_REPO_TAG_NAME.tolower().startswith("deploy"))
{
# to do a release, create a tag in the form "Deploy_VERSION"
# VERSION must be a valid version string (without leading 'v')
# this tag will be deleted and a new release "vVERSION" created.
git checkout -q master
$release = $Env:APPVEYOR_REPO_TAG_NAME.split("_", 2)[1]
$url = if($Env:SFTP_URL){' --docs --url "' + $env:SFTP_URL + '"'} else {''}
python "_build\Build.py" --build --package --release --version $release $url
} Else {
# WIP
python "_build\Build.py" --build --package
.\EventGhost.exe -install
}
$Env:SetupExe = gci -recurse -filter "_build\output\*Setup.exe" -name
# update the appveyor build version to be the same as the EventGhost version
$start = $env:SetupExe.IndexOf("_")
$length = $env:SetupExe.LastIndexOf("_") - $start
$build_version = $env:SetupExe.Substring($start + 1, $length - 1)
Update-AppveyorBuild -Version "$build_version"
# Make sure the appveyor cache is only saved if our build was successfull
If (-Not (Test-Path(".\EventGhost.exe"))) {$env:APPVEYOR_CACHE_SKIP_SAVE = "true"}
" "
"=============== EventGhost build finished ==============="
" "
" "
build:
off
# If we don't turn build off, we get an error from appveyor telling us,
# we should decide, which project or solution file to use, because the
# folder contains more than one project or solution file.
# We don't really "build" (with a compiler), but Appveyor finds the
# solution files in the extension sub-directories and complains.
#after_test:
# - cmd: echo "=============== EventGhost build finished ==============="
# # - cmd: START /WAIT %setup-exe% /VERYSILENT /SUPPRESSMSGBOXES /NOCLOSEAPPLICATIONS
artifacts:
- path: _build\output\$(SetupExe)
name: $(SetupExe)
- path: _build\output\Build.log
name: Build.log
- path: _build\output\CHANGELOG.md
name: CHANGELOG.md
- path: _build\output\CHANGELOG_THIS_RELEASE.md
name: CHANGELOG_THIS_RELEASE.md
- path: _build\output\CHANGELOG_THIS_RELEASE.bb
name: CHANGELOG_THIS_RELEASE.bb
notifications:
- provider: GitHubPullRequest
template: >-
[{{buildVersion}} {{status}}]({{buildUrl}}) (commit {{commitUrl}})
Artifacts:
{{#jobs}}
{{#artifacts}}
[{{name}}]({{permalink}})
{{/artifacts}}
{{/jobs}}
on_build_success: true
on_build_failure: true
on_build_status_changed: false
- provider: Slack
incoming_webhook:
secure: jvFmrrWYdHWb5+Lou7xIXMvjZTjR4/o7YwVMeMBUPH3KKYti85fsycwk0GxveESFGlyxIPfgy3HwZDtb1xhaFlQJlvInvYXUpDfBZQHe4EM=
template: >-
<{{buildUrl}}|{{projectName}} {{buildVersion}} {{status}}>
Commit <{{commitUrl}}|{{commitId}}> by {{commitAuthor}} on {{commitDate}}:
Commit message: _{{commitMessage}}_
Artifacts:
{{#jobs}}{{#artifacts}}<{{permalink}}|{{name}}>
{{/artifacts}}{{/jobs}}
on_build_success: true
on_build_failure: true
on_build_status_changed: true
#on_finish:
# # Enable Remotedesktop and pause the build execution
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# notifications:
# - provider: GitHubPullRequest
# template: "{{#passed}}:white_check_mark: [Setup.exe](https://ci.appveyor.com/api/buildjobs/$(APPVEYOR_JOB_ID)/artifacts/_build%2Foutput%2F$(setup-exe)){{/passed}}{{#failed}}:x:{{/failed}} [Build {{&projectName}} {{buildVersion}} {{status}}]({{buildUrl}}) (commit {{commitUrl}} by @{{&commitAuthorUsername}})"