-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
252 lines (225 loc) · 6.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
# LOVE Multiplatform GitLab CI
# Fill in the project info
variables:
GAME_TITLE: "Rose of Dragontail"
GAME_TITLE_NOSPACE: Rose_of_Dragontail
GIT_DEPTH: "1"
GIT_SUBMODULE_STRATEGY: recursive
# Fill in the demo info if providing a demo
.demo:
<<: &demo
rules:
- if: '$ONLY_JOB != null && $ONLY_JOB != $CI_JOB_NAME'
when: never
- if: '$CI_PIPELINE_SOURCE == "web"'
- if: '$CI_COMMIT_TAG =~ /demo/'
variables:
<<: &demo-variables
GAME_TITLE: "Rose of Dragontail Demo"
GAME_TITLE_NOSPACE: "Rose_of_Dragontail_Demo"
GAME_TYPE: demo
artifacts:
<<: &demo-artifacts-exclude
exclude:
- "**/libsteam_api.so"
- "**/luasteam.so"
- "**/steam_api*.dll"
- "**/luasteam.dll"
.full:
<<: &full
rules:
- if: '$ONLY_JOB != null && $ONLY_JOB != $CI_JOB_NAME'
when: never
- if: '$CI_PIPELINE_SOURCE == "web"'
- if: '$CI_COMMIT_TAG != null && $CI_COMMIT_TAG !~ /demo/'
stages:
- build
image: alpine:latest
before_script:
- apk add --update git zip luajit
.debian:
<<: &debian
before_script:
- apt-get update
- apt-get install -y -qq git zip luajit
.build-data: &build-data
stage: build
script:
- apk add wget xz
- ./make-game.sh
artifacts:
name: "${CI_PROJECT_NAME}-${CI_COMMIT_REF_NAME}-data"
paths:
- "${GAME_ASSET}"
.build-linux: &build-linux
<<: *debian
stage: build
image: debian:stretch-slim
script:
- apt-get install -y -qq file wget fuse libglib2.0-0 curl
- ./make-linux.sh
cache:
key: "${CI_PROJECT_NAME}-linux-${ARCH}"
paths:
- "love-${LOVE_VERSION}-${ARCH}.AppImage"
- "appimagetool"
- "*.deb"
artifacts:
<<: &build-linux-artifacts
name: "${CI_PROJECT_NAME}-${CI_COMMIT_REF_NAME}-linux-${ARCH}"
paths:
- ${GAME_TITLE_NOSPACE}-${ARCH}
.build-windows: &build-windows
<<: *debian
image: tianon/wine
stage: build
variables:
ARCH_BITS: "64"
<<: &build-windows-variables
ICO: "appicon.ico"
WINEPREFIX: "${CI_PROJECT_DIR}/.wine${ARCH_BITS}"
script:
- apt-get install -y -qq wget curl
- ./make-windows.sh
cache:
key: "${CI_PROJECT_NAME}-win-${ARCH_BITS}"
paths:
- "love-${LOVE_VERSION}-win${ARCH_BITS}"
- "bin"
- "rcedit-x64.exe"
- ".wine${ARCH_BITS}"
artifacts:
<<: &build-windows-artifacts
name: "${CI_PROJECT_NAME}-${CI_COMMIT_REF_NAME}-win-${ARCH_BITS}"
paths:
- "${GAME_TITLE}"
.build-dev-windows: &build-dev-windows
stage: build
variables:
ARCH_BITS: "64"
script:
- apk add wget
- ./make-dev-windows.sh
cache:
key: "${CI_PROJECT_NAME}-win-${ARCH_BITS}"
paths:
- "love-*-win${ARCH_BITS}/"
- "bin"
artifacts:
name: "${CI_PROJECT_NAME}-dev-win-${ARCH_BITS}"
paths:
- "${GAME_TITLE}"
.build-osx: &build-osx
<<: *debian
stage: build
image: fzwoch/osxcross
variables:
CFBundleIdentifier: "${APPLICATION_ID}"
<<: &build-osx-variables
NSHumanReadableCopyright: "${COPYRIGHT}"
INSTALL_NAME_TOOL: x86_64-apple-darwin12-install_name_tool
script:
- apt-get install -y -qq wget
- ./make-macosx.sh
cache:
key: "${CI_PROJECT_NAME}-osx"
paths:
- "love.app"
- "game-music-emu"
artifacts:
name: "${CI_PROJECT_NAME}-${CI_COMMIT_REF_NAME}-osx"
paths:
- "${GAME_TITLE}.app"
.build-android: &build-android
<<: *debian
stage: build
image: ioribranford/build-love-android:11.4
variables:
GRADLE_USER_HOME: "$CI_PROJECT_DIR/.gradle"
script:
- ./setup-android.sh
- ./make-android.sh
cache:
key: "${CI_PROJECT_NAME}-android"
paths:
- love-android
- .gradle
artifacts:
name: "${CI_PROJECT_NAME}-${CI_COMMIT_REF_NAME}-android"
paths:
- "${GAME_TITLE_NOSPACE}*.apk"
- "${GAME_TITLE_NOSPACE}*.aab"
- native-debug-symbols.zip
data:
variables:
GAME_ASSET: "${CI_PROJECT_NAME}.love"
<<: *build-data
<<: *full
linux-x86_64:
<<: *build-linux
<<: *full
variables:
ARCH: "x86_64"
.linux-i686:
<<: *build-linux
<<: *full
image: i386/debian:stretch-slim
variables:
ARCH: "i686"
.linux-armhf:
<<: *build-linux
<<: *full
image: arm32v7/debian:stretch-slim
variables:
ARCH: "armhf"
windows:
<<: *build-windows
<<: *full
.osx:
<<: *build-osx
<<: *full
.android:
<<: *build-android
<<: *full
.demo-data:
variables:
<<: *demo-variables
GAME_ASSET: "${CI_PROJECT_NAME}-${GAME_TYPE}.love"
<<: *build-data
<<: *demo
.demo-linux-x86_64:
<<: *build-linux
<<: *demo
variables:
ARCH: "x86_64"
<<: *demo-variables
artifacts:
<<: *build-linux-artifacts
<<: *demo-artifacts-exclude
.demo-linux-armhf:
<<: *build-linux
<<: *demo
image: arm32v7/debian:stretch-slim
variables:
ARCH: "armhf"
<<: *demo-variables
.demo-windows:
<<: *build-windows
<<: *demo
variables:
<<: *demo-variables
<<: *build-windows-variables
ARCH_BITS: "64"
artifacts:
<<: *build-windows-artifacts
<<: *demo-artifacts-exclude
.demo-osx:
<<: *build-osx
<<: *demo
variables:
<<: *demo-variables
<<: *build-osx-variables
CFBundleIdentifier: "${APPLICATION_ID}demo"
.dev-windows:
<<: *build-dev-windows
<<: *full