forked from FarGroup/FarManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
200 lines (183 loc) · 7.29 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
version: 3.0.{branch}.{build}
branches:
only:
- master
skip_tags: true
skip_non_tags: false
max_jobs: 8
image: Visual Studio 2017
init:
clone_folder: c:\projects\FarManager
shallow_clone: true
clone_depth: 1
install:
#update AppVeyor build number to match Far build number
- cd far && for /f "tokens=1,2,4 delims=," %%i in ('tools\m4 -P farversion.inc.m4') do appveyor UpdateBuild -Version %%i.%%j.%%k.%APPVEYOR_BUILD_NUMBER% && cd ..
#clone NetBox
- git clone https://github.com/michaellukashov/Far-NetBox.git
- cd Far-NetBox
- git checkout far3
- cd ..
#clone and build Colorer-schemes
- git clone https://github.com/colorer/Colorer-schemes.git
- cd Colorer-schemes
- appveyor-retry choco install ant --ignore-dependencies
- set JAVA_HOME=C:\Program Files\Java\jdk1.8.0
- build.cmd base.far.clean
- build.cmd base.far
- cd ..
#clone FarColorer
- git clone https://github.com/colorer/FarColorer.git --recursive
#set locale to russian, needed for chm generation
- ps: Set-WinSystemLocale -SystemLocale ru-RU
- ps: Start-Sleep -s 5
- ps: Restart-Computer
- ps: Start-Sleep -s 5
environment:
matrix:
- platform: Win32
configuration: Release
CPU: i386
APPVER: 6.0
ADD_MAKE:
ADD_MAKE_MSI: RELEASE=1
NAME_ADD:
bit: 32
- platform: x64
configuration: Release
CPU: AMD64
APPVER: 6.0
ADD_MAKE:
ADD_MAKE_MSI: RELEASE=1
NAME_ADD:
bit: 64
- platform: Win32
configuration: Debug
CPU: i386
APPVER: 6.0
ADD_MAKE: DEBUG=1
ADD_MAKE_MSI:
NAME_ADD: .Debug
bit: 32
- platform: x64
configuration: Debug
CPU: AMD64
APPVER: 6.0
ADD_MAKE: DEBUG=1
NAME_ADD: .Debug
ADD_MAKE_MSI:
bit: 64
build_script:
#prevent lost commands after reboot in install
- ps: Start-Sleep -s 5
#update AppVeyor build number to match Far build number (again after reboot)
- cd far && for /f "tokens=1,2,4 delims=," %%i in ('tools\m4 -P farversion.inc.m4') do appveyor UpdateBuild -Version %%i.%%j.%%k.%APPVEYOR_BUILD_NUMBER% && cd ..
#build Plugin SDK Encyclopedia
- enc/tools/tool.make_enc_chm.bat
#build Lua MacroAPI docs
- enc/tools/tool.make_lua_chm.bat
#set vs environment variables
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars%bit%.bat"
#build far
- cd far
- nmake /f makefile_vc %ADD_MAKE%
- nmake /f makefile_vc install INSTALLDIR=..\ci\%configuration%.%platform% %ADD_MAKE%
- update_headers.bat nocommit
- cd ..
#build plugins
- cd plugins
- nmake /f makefile_all_vc %ADD_MAKE% INSTALL=..\ci\%configuration%.%platform%\Plugins FAR_WORKDIR=..\..\ci\%configuration%.%platform%
- cd ..
#build fexcept if needed
- cd misc\fexcept
- if "%platform%" == "x86" nmake /f makefile_vc %ADD_MAKE% INSTALL=..\..\ci\%configuration%.%platform% FAR_WORKDIR=..\..\ci\%configuration%.%platform%
- cd ..\..
#build netbox
- set FAR_VERSION=Far3
- set PROJECT_ROOT=%APPVEYOR_BUILD_FOLDER%\Far-NetBox
- set PROJECT_CONFIG=%configuration%
- set PROJECT_BUILD=Build
- set PROJECT_CONF=%platform%
- set PROJECT_PLATFORM=Win32
- if "%platform%" == "x64" set PROJECT_PLATFORM=x64
- cd Far-NetBox
- mkdir build\%configuration%\%platform%
- cd build\%configuration%\%platform%
- cmake -G "NMake Makefiles" -D PROJECT_ROOT=%PROJECT_ROOT% -D CMAKE_BUILD_TYPE=%PROJECT_CONFIG% -D CONF=%PROJECT_CONF% -D FAR_VERSION=%FAR_VERSION% %PROJECT_ROOT%\src\NetBox
- nmake
- cd ..\..\..\..
- xcopy /e /q /y /k Far-NetBox\%FAR_VERSION%_%platform%\Plugins\* ci\%configuration%.%platform%\Plugins
- copy /Y Far-NetBox\ChangeLog ci\%configuration%.%platform%\Plugins\NetBox
- copy /Y Far-NetBox\*.md ci\%configuration%.%platform%\Plugins\NetBox
- copy /Y Far-NetBox\LICENSE.txt ci\%configuration%.%platform%\Plugins\NetBox
#build FarColorer
- set PROJECT_ROOT=%APPVEYOR_BUILD_FOLDER%\FarColorer
- set PROJECT_CONFIG=%configuration%
- set PROJECT_BUILD=Build
- set PROJECT_CONF=%platform%
- set PROJECT_PLATFORM=Win32
- if "%platform%" == "x64" set PROJECT_PLATFORM=x64
- cd FarColorer
- mkdir build\%configuration%\%platform%
- cd build\%configuration%\%platform%
- cmake -G "NMake Makefiles" -D PROJECT_ROOT=%PROJECT_ROOT% -D CMAKE_BUILD_TYPE=%PROJECT_CONFIG% -D CONF=%PROJECT_CONF% %PROJECT_ROOT%\src
- nmake
- cd ..\..\..\..
- mkdir ci\%configuration%.%platform%\Plugins\FarColorer\base
- xcopy /e /q /y /k Colorer-schemes\build\basefar\* ci\%configuration%.%platform%\Plugins\FarColorer\base
- mkdir ci\%configuration%.%platform%\Plugins\FarColorer\bin
- copy /Y FarColorer\build\%configuration%\%platform%\colorer.* ci\%configuration%.%platform%\Plugins\FarColorer\bin
- copy /Y FarColorer\docs\history.ru.txt ci\%configuration%.%platform%\Plugins\FarColorer
- copy /Y FarColorer\LICENSE ci\%configuration%.%platform%\Plugins\FarColorer
- copy /Y FarColorer\README.md ci\%configuration%.%platform%\Plugins\FarColorer
- copy /Y FarColorer\misc\* ci\%configuration%.%platform%\Plugins\FarColorer\bin
#remove not needed build artifacts
- if "%platform%" == "x86" powershell "Get-ChildItem ci\${Env:configuration}`.${Env:platform}\FExcept -filter *.map -File | Remove-Item"
- ps: Get-ChildItem ci\${Env:configuration}`.${Env:platform}\ -recurse -File | Where-Object { @(".lib", ".exp", ".ilk") -contains $_.extension } | Remove-Item
test: off
after_build:
#copy pregenerated CHM files
- mkdir ci\%configuration%.%platform%\Encyclopedia
- copy /Y enc\build\chm\ru\FarEncyclopedia.ru.chm ci\%configuration%.%platform%\Encyclopedia
- copy /Y enc\build\lua\luafar_manual\luafar_manual.chm ci\%configuration%.%platform%\Encyclopedia
- copy /Y enc\build\lua\macroapi_manual.en\macroapi_manual.en.chm ci\%configuration%.%platform%\Encyclopedia
- copy /Y enc\build\lua\macroapi_manual.ru\macroapi_manual.ru.chm ci\%configuration%.%platform%\Encyclopedia
#copy misc docs and addons
- xcopy /e /q /y /k extra\* ci\%configuration%.%platform%\
#archive
- cd ci\%configuration%.%platform%
#set NAME_PREFIX variable as otherwise it is not available when artifacts are collected
- set NAME_PREFIX="Far%NAME_ADD%.%platform%.%appveyor_build_version%.%APPVEYOR_REPO_COMMIT%"
- appveyor SetVariable -Name NAME_PREFIX -Value "%NAME_PREFIX%"
#archive PDBs
- 7z a -ir!*.pdb "%APPVEYOR_BUILD_FOLDER%\%NAME_PREFIX%.pdb.7z"
#archive Far without PDBs
- 7z a -xr!*.pdb "%APPVEYOR_BUILD_FOLDER%\%NAME_PREFIX%.7z"
- cd ..\..
#create msi
- cd misc\msi-installer
- set Path=%Path%;%WIX%\bin
- cl -nologo -EHsc -DNIGHTLY genparams.cpp
- genparams %APPVEYOR_BUILD_FOLDER%\ci\%configuration%.%platform% %platform%
- nmake -nologo %ADD_MAKE_MSI%
- cd ..\..
- move ci\%configuration%.%platform%\final.msi "%APPVEYOR_BUILD_FOLDER%\%NAME_PREFIX%.msi"
artifacts:
- path: $(NAME_PREFIX).7z
name: Far Manager
- path: $(NAME_PREFIX).msi
name: Far Manager MSI
- path: $(NAME_PREFIX).pdb.7z
name: Far Manager PDBs
deploy:
release: v$(appveyor_build_version)
description: 'Far Manager $(appveyor_build_version) - $(APPVEYOR_REPO_COMMIT)'
provider: GitHub
auth_token:
secure: uQem/Z1RiWuohaCg2d+C+1wIcXkl/NOHwMMSX1anD2rFSwO4b9HZVBNBY2VswsaN
artifact: /.*\.(msi|7z)/
draft: false
prerelease: false
on:
branch: master # release from master branch only
configuration: Release # only release builds