-
Notifications
You must be signed in to change notification settings - Fork 2
/
.appveyor.yml
168 lines (140 loc) · 6.13 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
# 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.
image: Visual Studio 2017
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:\Stackless35'
PYTHONPATH: 'C:\Stackless35;C:\Stackless35\Scripts;C:\Stackless35\DLLs;C:\Stackless35\Lib;C:\Stackless35\Lib\site-packages;'
matrix:
fast_finish: true
cache:
# Invalidate cache if .appveyor.yml has changed
# - C:\Stackless35 -> .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:PYTHONPATH + ";" + $Env:PATH
$PythonFolder = $Env:PYTHON
$PythonScripts = $PythonFolder + "\Scripts"
$SitePackages = $PythonFolder + "\lib\site-packages"
$SysWOW = $Env:SYSTEMROOT + "\SysWOW64"
$PythonWindowsDLL = $SysWOW + "\python35.dll"
$PythonDLL = $PythonFolder + "\python35.dll"
$InstallersFolder = $Env:APPVEYOR_BUILD_FOLDER + "\output\"
" "
"=============== prepare EventGhost build environment ==============="
If (-not (Test-Path $PythonFolder))
{
Function PipInstall ($mod)
{
" "
"--- " + $mod
" Installing..."
pip install --no-cache-dir -q $mod
" Done."
}
" "
"--- Stackless 3.5.4 x86-64"
$StacklessInstaller = $InstallersFolder + "stackless-3.5.4-amd64.exe"
$StacklessInstallDir = $PythonFolder
$StacklessURL = "http://www.stackless.com/binaries/MSI/3.5.4/stackless-3.5.4-amd64.exe"
Start-FileDownload $StacklessURL -Timeout 60000 -FileName $StacklessInstaller
" Installing Stackless 3.5.4..."
Start-Process $StacklessInstaller "/quiet InstallAllUsers=1 TargetDir=$StacklessInstallDir" -Wait
" Done."
" "
" Updating pip..."
python -m pip install --no-cache-dir -q -U "pip"
" Done."
" "
" Updating setuptools..."
python -m pip install --no-cache-dir -q -U "setuptools"
" Done."
" "
PipInstall "sphinx"
PipInstall "commonmark"
PipInstall "pillow"
PipInstall "pycrypto"
PipInstall "comtypes"
PipInstall "paramiko"
PipInstall "pywin32"
PipInstall "wxPython"
PipInstall "websocket-client-py3"
PipInstall "psutil"
PipInstall "tornado"
PipInstall "qrcode"
PipInstall "pycurl"
PipInstall "agithub"
PipInstall "requests"
PipInstall "cx_Freeze"
}
#"--- Inno Setup 5.5.9"
#$InnoInstaller = $InstallersFolder + "innosetup-5.5.9-unicode.exe"
#$InnoURL = "http://files.jrsoftware.org/is/5/innosetup-5.5.9-unicode.exe"
#Start-FileDownload $InnoURL -Timeout 60000 -FileName $InnoInstaller | ForEach-Object { Write-Host " " + $_ }
#" Installing Inno Setup 5.5.9..."
#Start-Process $InnoInstaller -Arg "/SP /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /RESTARTAPPLICATIONS /NOICONS" -NoNewWindow -Wait
#" Done."
" "
" "
"=============== start the EventGhost build ==============="
" "
python "setup.py" build_exe
# Make sure the appveyor cache is only saved if our build was successfull
$Env:SetupExe = gci -recurse -filter "output\*Setup.exe" -name
If (-Not $Env:SetupExe) {
$env:APPVEYOR_CACHE_SKIP_SAVE = "true"
} else {
# 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"
}
" "
"=============== EventGhost build finished ==============="
" "
" "
7z a -bsp1 -bb3 output\no_installer.zip -r build\eventghost\*.*
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.
artifacts:
- path: output\$(SetupExe)
name: $(SetupExe)
- path: output\Build.log
name: Build.log
- path: output\no_installer.zip
name: No Installer
# - 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
#after_test:
# - cmd: echo "=============== EventGhost build finished ==============="
# # - cmd: START /WAIT %setup-exe% /VERYSILENT /SUPPRESSMSGBOXES /NOCLOSEAPPLICATIONS
#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}})"