forked from digarok/gsplus
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
318 lines (292 loc) · 7.89 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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
stages:
- build
- package
- deploy
- updatewebsite
# TARGET SYSTEM: UBUNTU X
build-ubuntu-x:
tags:
- ubuntu
stage: build
script:
- sudo apt-get update -qq && sudo apt-get install -y -qq g++ libpcap0.8-dev libx11-dev libxext-dev re2c cmake
- mkdir build
- cd build
- cmake ..
- make
- make clean ; make
- mv bin/GSplus ../gsplusx
artifacts:
paths:
- gsplusx
expire_in: 10 minutes
only:
- master
package-ubuntu-x:
tags:
- ubuntu
stage: package
script:
- cp src/config.txt .
- 'echo "# CI_BUILD_ID: $CI_BUILD_ID" >> config.txt'
- cp LICENSE.txt doc/
artifacts:
paths:
- gsplusx
- config.txt
- doc/gsplusmanual.pdf
- doc/LICENSE.txt
expire_in: 10 minutes
only:
- master
# TARGET SYSTEM: DEPRECATED, UBUNTU SDL
build-ubuntu-sdl:
tags:
- ubuntu
stage: build
script:
- sudo apt-get update -qq && sudo apt-get install -y -qq g++ libpcap0.8-dev libx11-dev libsdl2-dev libfreetype6-dev libsdl2-image-dev
- cd src
- ln -s vars_x86linux_sdl vars
- make clean ; make
only:
- master
# TARGET SYSTEM: REALLY ANY LINUX, BUT UBUNTU W SDL2
build-ubuntu-sdl2:
tags:
- ubuntu
stage: build
script:
- sudo apt-get update -qq && sudo apt-get install -y -qq g++ libpcap0.8-dev libx11-dev libsdl2-dev libfreetype6-dev libsdl2-image-dev re2c cmake
- mkdir build
- cd build
- cmake ..
- make
- mv bin/GSplus ../gsplus-ubuntu-sdl.bin
artifacts:
paths:
- gsplus-ubuntu-sdl.bin
expire_in: 10 minutes
package-ubuntu-sdl2:
tags:
- ubuntu
stage: package
variables:
GIT_STRATEGY: fetch
PACKAGE_DIR: gsplus-ubuntu-sdl
script:
- mkdir $PACKAGE_DIR
- mkdir $PACKAGE_DIR/doc
- cp gsplus-ubuntu-sdl.bin $PACKAGE_DIR/gsplus
- cp src/config.txt $PACKAGE_DIR
- 'echo "# CI_BUILD_ID: $CI_BUILD_ID" >> $PACKAGE_DIR/config.txt'
- cp src/parallel.rom %PACKAGE_DIR%
- cp LICENSE.txt $PACKAGE_DIR/doc/
- cp doc/gsplusmanual.pdf %PACKAGE_DIR%
- tar -cvjf gsplus-ubuntu-sdl.tar.bz2 $PACKAGE_DIR
artifacts:
paths:
- gsplus-ubuntu-sdl.tar.bz2
expire_in: 10 minutes
package-ubuntu-sdl2-deb:
tags:
- ubuntu
stage: package
variables:
GIT_STRATEGY: fetch
PACKAGE_NAME: gsplus_$CI_VERSION-0
script:
- mkdir -p $PACKAGE_NAME/usr/local/bin
- mkdir -p $PACKAGE_NAME/DEBIAN
- cp gsplus-ubuntu-sdl.bin $PACKAGE_NAME/usr/local/bin/gsplus
- cp assets/control $PACKAGE_NAME/DEBIAN
- dpkg-deb --build $PACKAGE_NAME
artifacts:
paths:
- $PACKAGE_NAME.deb
expire_in: 10 minutes
deploy-ubuntu:
tags:
- ubuntu
stage: deploy
variables:
GIT_STRATEGY: none
PACKAGE_NAME: gsplus_$CI_VERSION-0
script:
- aws s3 cp gsplus-ubuntu-sdl.tar.bz2 s3://$AWS_BUCKET/$CI_TAG/$CI_VERSION/$CI_PIPELINE_ID/ubuntu-sdl/$CI_BUILD_ID/ --acl public-read
- aws s3 cp $PACKAGE_NAME.deb s3://$AWS_BUCKET/$CI_TAG/$CI_VERSION/$CI_PIPELINE_ID/ubuntu-sdl-deb/$CI_BUILD_ID/ --acl public-read
# TARGET SYSTEM: OSX 10.SOMETHING
build-osx:
tags:
- osx
stage: build
script:
- mkdir build
- cd build
- cmake ..
- make
- make clean ; make
- mv bin/GSplus.app/Contents/MacOS/GSplus ../gsplus-osx
artifacts:
paths:
- gsplus-osx
expire_in: 15 minutes
package-osx:
tags:
- osx
stage: package
script:
- mv gsplus-osx gsplus
- cp src/config.txt .
- 'echo "# CI_BUILD_ID: $CI_BUILD_ID" >> config.txt'
- chmod +x make_dist_mac.sh
- ./make_dist_mac.sh
- chmod +x make_dmg_mac.sh
- ./make_dmg_mac.sh
artifacts:
paths:
- GSplus-Install.dmg
expire_in: 10 minutes
deploy-osx:
tags:
- osx
stage: deploy
variables:
GIT_STRATEGY: none
script:
- aws s3 cp GSplus-Install.dmg s3://$AWS_BUCKET/$CI_TAG/$CI_VERSION/$CI_PIPELINE_ID/osx/$CI_BUILD_ID/ --acl public-read
# TARGET SYSTEM: WIN32 GDI WIN API UNDER MSYS2
build-win32-gdi:
tags:
- windows,msys
stage: build
script:
- ls
- mkdir build
- cd build
- cmake ../ -DDRIVER=WIN32 -DWITH_DEBUGGER=OFF -DWITH_STATIC=ON -G "Unix Makefiles"
- make VERBOSE=1 GSplus
- mv bin/GSplus.exe ../GSplus-win32-gdi.exe
artifacts:
paths:
- GSplus-win32-gdi.exe
expire_in: 10 minutes
only:
- master
- /^win.*/
- /^next.*/
package-win32-gdi:
tags:
- windows,msys
variables:
GIT_STRATEGY: fetch
PACKAGE_DIR: gsplus-win32-gdi
stage: package
script:
- ls
- mkdir %PACKAGE_DIR%
- cp src/config.txt %PACKAGE_DIR%
- 'echo "# CI_BUILD_ID: $CI_BUILD_ID" >> %PACKAGE_DIR%/config.txt'
- cp LICENSE.txt doc/
- cp GSplus-win32-gdi.exe %PACKAGE_DIR%/GSplus.exe
- cp LICENSE.txt %PACKAGE_DIR%
- cp src/config.txt %PACKAGE_DIR%
- cp src/parallel.rom %PACKAGE_DIR%
- cp doc/gsplusmanual.pdf %PACKAGE_DIR%
- cp /mingw32/bin/libgcc_s_dw2-1.dll %PACKAGE_DIR%
- cp /mingw32/bin/libstdc++-6.dll %PACKAGE_DIR%
- cp /mingw32/bin/libwinpthread-1.dll %PACKAGE_DIR%
- zip gsplus-win32-gdi.zip -r %PACKAGE_DIR%
artifacts:
paths:
- gsplus-win32-gdi.zip
expire_in: 10 minutes
only:
- master
- /^win.*/
- /^next.*/
deploy-win32-gdi:
tags:
- osx
stage: deploy
variables:
GIT_STRATEGY: none
script:
- aws s3 cp gsplus-win32-gdi.zip s3://$AWS_BUCKET/$CI_TAG/$CI_VERSION/$CI_PIPELINE_ID/win32/$CI_BUILD_ID/ --acl public-read
only:
- master
- /^win.*/
- /^next.*/
# TARGET SYSTEM: MSYS2 MINGW32 SDL2
build-win32-sdl2:
tags:
- windows
stage: build
script:
- mkdir build
- cd build
- bash -l -c 'PATH=/mingw32/bin:$PATH ; MSYSTEM=MINGW32 MSYSTEM_PREFIX=/mingw32 /mingw32/bin/cmake ../ -DDRIVER=SDL2 -DWITH_DEBUGGER=OFF -DWITH_STATIC=ON -G "MSYS Makefiles"'
- bash -l -c 'PATH=/mingw32/bin:$PATH ;MSYSTEM=MINGW32 MSYSTEM_PREFIX=/mingw32 /mingw32/bin/mingw32-make VERBOSE=1 GSplus'
- mv bin/GSplus.exe ../GSplus-win32-sdl.exe
artifacts:
paths:
- GSplus-win32-sdl.exe
expire_in: 10 minutes
only:
- master
- /^win.*/
- /^next.*/
package-win32-sdl2:
tags:
- windows
stage: package
variables:
GIT_STRATEGY: fetch
PACKAGE_DIR: gsplus-win32-sdl
script:
- ls
- mkdir %PACKAGE_DIR%
- cp GSplus-win32-sdl.exe %PACKAGE_DIR%/GSplus.exe
- cp LICENSE.txt %PACKAGE_DIR%
- cp src/config.txt %PACKAGE_DIR%
- cp src/parallel.rom %PACKAGE_DIR%
- cp doc/gsplusmanual.pdf %PACKAGE_DIR%
- cp /mingw32/bin/libbz2-1.dll %PACKAGE_DIR%
- cp /mingw32/bin/libfreetype-6.dll %PACKAGE_DIR%
- cp /mingw32/bin/libgcc_s_dw2-1.dll %PACKAGE_DIR%
- cp /mingw32/bin/libglib-2.0-0.dll %PACKAGE_DIR%
- cp /mingw32/bin/libgraphite2.dll %PACKAGE_DIR%
- cp /mingw32/bin/libharfbuzz-0.dll %PACKAGE_DIR%
- cp /mingw32/bin/libiconv-2.dll %PACKAGE_DIR%
- cp /mingw32/bin/libintl-8.dll %PACKAGE_DIR%
- cp /mingw32/bin/libpcre-1.dll %PACKAGE_DIR%
- cp /mingw32/bin/libpng16-16.dll %PACKAGE_DIR%
- cp /mingw32/bin/libstdc++-6.dll %PACKAGE_DIR%
- cp /mingw32/bin/libwinpthread-1.dll %PACKAGE_DIR%
- cp /mingw32/bin/SDL2.dll %PACKAGE_DIR%
- cp /mingw32/bin/SDL2_image.dll %PACKAGE_DIR%
- cp /mingw32/bin/zlib1.dll %PACKAGE_DIR%
- zip gsplus-win32-sdl.zip -r %PACKAGE_DIR%
artifacts:
paths:
- gsplus-win32-sdl.zip
expire_in: 10 minutes
deploy-win32-sdl2:
tags:
- osx
stage: deploy
variables:
GIT_STRATEGY: none
script:
- aws s3 cp gsplus-win32-sdl.zip s3://$AWS_BUCKET/$CI_TAG/$CI_VERSION/$CI_PIPELINE_ID/win-sdl/$CI_BUILD_ID/ --acl public-read
update-website-universal:
tags:
- osx
stage: updatewebsite
variables:
GIT_STRATEGY: none
script:
- aws s3 ls gsplus-artifacts/ --recursive > s3artifacts.txt
- php assets/updatewebsite.php s3artifacts.txt public > index.html
- php assets/updatewebsite.php s3artifacts.txt auto > index_auto.html
- aws s3 cp index.html s3://$AWS_BUCKET/ --acl public-read