forked from victor-yacovlev/kumir2
-
Notifications
You must be signed in to change notification settings - Fork 12
/
.gitlab-ci.yml
227 lines (212 loc) · 6.39 KB
/
.gitlab-ci.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
stages:
- build
- dist
build:winxp:
stage: build
tags:
- winxp
artifacts:
name: arts-%CI_PIPELINE_ID%-winxp-build
expire_in: 1 hour
when: always
paths:
- build/
script:
- if exist build\ rd /s/q build\
- md build
- cd build
- set PATH=%MINGWDIR%\bin;C:\Program Files\CMake\bin
- echo %date% %time%
- cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DUSE_QT=4 -DQT_QMAKE_EXECUTABLE=%QT4DIR%/bin/qmake.exe -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=%PYTHON_EXECUTABLE% -G "MinGW Makefiles" ..
- mingw32-make -j8 -k
- echo %date% %time%
dist:winxp:
stage: dist
tags:
- winxp
dependencies:
- build:winxp
artifacts:
name: arts-%CI_PIPELINE_ID%-winxp-dist
paths:
- kumir2-*-install.exe
script:
- if exist build\pack\ rd /s/q build\pack\
- if exist kumir2-*-install.exe del /f/s/q kumir2-*-install.exe
- md build\pack
- cd build\pack
- copy ..\..\LICENSE_RU.rtf .
- xcopy /ise ..\bin bin
- xcopy /ise ..\lib lib
- xcopy /ise ..\share share
- copy %QT4DIR%\bin\QtCore4.dll bin\
- copy %QT4DIR%\bin\QtGui4.dll bin\
- copy %QT4DIR%\bin\QtMultimedia4.dll bin\
- copy %QT4DIR%\bin\QtNetwork4.dll bin\
- copy %QT4DIR%\bin\QtOpenGL4.dll bin\
- copy %QT4DIR%\bin\QtScript4.dll bin\
- copy %QT4DIR%\bin\QtSql4.dll bin\
- copy %QT4DIR%\bin\QtSvg4.dll bin\
- copy %QT4DIR%\bin\QtXml4.dll bin\
- copy %QT4DIR%\bin\QtXmlPatterns4.dll bin\
- xcopy "%MINGWDIR%\bin\*.dll" bin\
- cd ..\..
- call %PYTHON_EXECUTABLE% scripts\query_version_info.py --mode=nsis_include_file --out=build\pack\nsis_version_info.nsh
- cd build\pack
- copy ..\..\kumir2.nsi .
- call "%NSIS_EXECUTABLE%" kumir2.nsi
- move kumir2-*-install.exe ..\..\
build:win32:
stage: build
tags:
- win32
artifacts:
name: arts-%CI_PIPELINE_ID%-win32-build
expire_in: 1 hour
when: always
paths:
- build/
script:
- if exist build\ rd /s/q build\
- md build
- cd build
- set QMAKESPEC=win32-msvc2015
- set INCLUDE=
- set LIB=
- set LIBPATH=
- call vsvars32.bat
- call vcvars32.bat
- set CL=/MP
- echo %date% %time%
- cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -Wno-dev -DCMAKE_PREFIX_PATH="%QTDIR%\lib\cmake" -DQt5_DIR="%QTDIR%\lib\cmake\Qt5" -DUSE_QT=5 -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=%PYTHON_EXECUTABLE% -G "Ninja" ..
- ninja -v -j8
- echo %date% %time%
dist:win32:
stage: dist
tags:
- win32
dependencies:
- build:win32
artifacts:
name: arts-%CI_PIPELINE_ID%-win32-dist
paths:
- kumir2-*-install.exe
script:
- if exist build\pack\ rd /s/q build\pack\
- if exist kumir2-*-install.exe del /f/s/q kumir2-*-install.exe
- md build\pack
- cd build\pack
- copy ..\..\LICENSE_RU.rtf .
- xcopy /ise ..\bin bin
- xcopy /ise ..\lib lib
- xcopy /ise ..\share share
- copy %QTDIR%\bin\Qt5Core.dll bin\
- copy %QTDIR%\bin\Qt5Gui.dll bin\
- copy %QTDIR%\bin\Qt5Multimedia.dll bin\
- copy %QTDIR%\bin\Qt5MultimediaWidgets.dll bin\
- copy %QTDIR%\bin\Qt5Network.dll bin\
- copy %QTDIR%\bin\Qt5OpenGL.dll bin\
- copy %QTDIR%\bin\Qt5Positioning.dll bin\
- copy %QTDIR%\bin\Qt5PrintSupport.dll bin\
- copy %QTDIR%\bin\Qt5Qml.dll bin\
- copy %QTDIR%\bin\Qt5Quick.dll bin\
- copy %QTDIR%\bin\Qt5Script.dll bin\
- copy %QTDIR%\bin\Qt5Sensors.dll bin\
- copy %QTDIR%\bin\Qt5Sql.dll bin\
- copy %QTDIR%\bin\Qt5Svg.dll bin\
- copy %QTDIR%\bin\Qt5Widgets.dll bin\
- copy %QTDIR%\bin\Qt5Xml.dll bin\
- copy %QTDIR%\bin\Qt5XmlPatterns.dll bin\
- md bin\platforms
- copy %QTDIR%\plugins\platforms\qminimal.dll bin\platforms\
- copy %QTDIR%\plugins\platforms\qwindows.dll bin\platforms\
- copy %QTDIR%\plugins\platforms\qoffscreen.dll bin\platforms\
- xcopy "%VC_REDIST_DIR%\x86\Microsoft.VC140.CRT\*.dll" bin\
- md src
- cd ..\..
- call %PYTHON_EXECUTABLE% scripts\get_bundle_name.py --prefix=git@20archive@20--out=build\pack\src\kumir2- --suffix=.src.zip@20--format=zip@20-9@20HEAD --out=run_git_archive.cmd
- copy kumir2.nsi build\pack\
- copy kumir2.nsi build\pack\src\
- call %PYTHON_EXECUTABLE% scripts\query_version_info.py --mode=nsis_include_file --out=build\pack\nsis_version_info.nsh
- type build\pack\nsis_version_info.nsh
- copy build\pack\nsis_version_info.nsh build\pack\src\
- type run_git_archive.cmd
- call run_git_archive.cmd
- cd build\pack
- call "%NSIS_EXECUTABLE%" kumir2.nsi
- move kumir2-*-install.exe ..\..\
build:mac:
stage: build
tags:
- mac_old
artifacts:
name: arts-$CI_PIPELINE_ID-mac-build
expire_in: 1 hour
when: always
paths:
- build/
script:
- rm -rf build
- mkdir build
- cd build
- export PATH=$QTDIR_MAC/bin:$PATH
- export MACOSX_DEPLOYMENT_TARGET=10.9
- date
- cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DUSE_QT=5 -DCMAKE_BUILD_TYPE=Release ..
- make -k -j8
- date
dist:mac:
stage: dist
tags:
- mac_old
dependencies:
- build:mac
artifacts:
name: arts-$CI_PIPELINE_ID-mac-dist
paths:
- Kumir-$CI_COMMIT_REF_NAME-$CI_PIPELINE_ID.dmg
script:
- cd build
- export PATH=$QTDIR_MAC/bin:$PATH
- export MACOSX_DEPLOYMENT_TARGET=10.9
- security unlock-keychain -p $MAC_KEYCHAIN_PASS
- macdeployqt Kumir.app "$CI_MDPA"
- echo "Libraries = Frameworks" >> Kumir.app/Contents/Resources/qt.conf
- macdeployqt Kumir.app "$CI_MDPA" -dmg
- mv Kumir.dmg ../Kumir-$CI_COMMIT_REF_NAME-$CI_PIPELINE_ID.dmg
build:linux:
stage: build
tags:
- linux
artifacts:
name: arts-$CI_PIPELINE_ID-linux-build
expire_in: 1 hour
when: always
paths:
- build/
script:
- rm -rf build
- mkdir build
- cd build
- date
- cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DUSE_QT=4 -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
- make -k -j8
- date
- du -k --max=1 . |sort -n
dist:linux:
stage: dist
tags:
- linux
dependencies:
- build:linux
artifacts:
name: arts-$CI_PIPELINE_ID-linux-dist
paths:
- Kumir2X-$CI_PIPELINE_ID.tar.gz
script:
- rm -rf Kumir2X-$CI_PIPELINE_ID.tar.gz
- cd build
- rm -rf Kumir2X-$CI_COMMIT_SHORT_SHA
- mkdir Kumir2X-$CI_COMMIT_SHORT_SHA
- mv bin lib share Kumir2X-$CI_COMMIT_SHORT_SHA/
- tar zcpf ../Kumir2X-$CI_PIPELINE_ID.tar.gz Kumir2X-$CI_COMMIT_SHORT_SHA/