forked from ubisoft/mixer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
263 lines (232 loc) · 5.82 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
stages:
- pre_release # a single stage allows test to run even if flake8 fails and makes it possible to get all the errors at once
- release
- deploy
flake8:
extends:
- .except_nightly_test
tags:
- docker
image: python:3
stage: pre_release
script:
- pip install black flake8 flake8-black pep8-naming flake8-bugbear --constraint requirements-dev.txt
- flake8 -v mixer tests extra
mypy:
extends:
- .except_nightly_test
tags:
- docker
image: python:3
stage: pre_release
script:
- pip install mypy --constraint requirements-dev.txt
- mypy mixer
allow_failure: true
doc:
stage: pre_release
extends:
- .except_on_gitlab.com
- .except_nightly_test
tags:
- docker
image: python:3
when: manual
script:
- pip install sphinx sphinx-rtd-theme
- sphinx-build -b html docs docs/_build/html
- rm -rf docs/_build/doctree
artifacts:
name: "${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHORT_SHA}_html"
paths:
- docs/_build
expire_in: 1 week
zip:
extends:
- .except_nightly_test
tags:
- docker
image: alpine
stage: pre_release
script:
- cp CHANGELOG.md README.md LICENSE mixer/
- rm -rf mixer/blender_data/tests/
artifacts:
name: "${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHORT_SHA}"
paths:
- mixer
expire_in: 1 week
# Note: you cannot extend this job with another only: variables job
# If you need that, you should rewrite and combine the rules
.only_on_gitlab.com:
only:
variables:
- $CI_SERVER_URL == "https://gitlab.com"
# Note: you cannot extend this job with another except: variables job
# If you need that, you should rewrite and combine the rules
.except_on_gitlab.com:
except:
variables:
- $CI_SERVER_URL == "https://gitlab.com"
# Note: you cannot extend this job with another only: variables job
# If you need that, you should rewrite and combine the rules
.only_version_tag:
only:
refs:
# see inject_version.py
- /^v([0-9]+)\.([0-9]+)\.([0-9]+)(\-[0-9A-Za-z-]+)?(\+[0-9A-Za-z-]+)?$/
.except_nightly_test:
except:
variables:
- $NIGHTLY_TEST == "true"
.only_nightly_test:
only:
variables:
- $NIGHTLY_TEST == "true"
release:
extends:
- .only_version_tag
- .except_nightly_test
dependencies:
- zip
tags:
- docker
image: python:3
stage: release
script:
- pip install requests
- rm -rf mixer/blender_data/tests/
- python -m zipfile -c mixer-${CI_COMMIT_REF_NAME}.zip mixer/
- python -m gitlab.release mixer-${CI_COMMIT_REF_NAME}.zip
artifacts:
paths:
- mixer-${CI_COMMIT_REF_NAME}.zip
####################################################################################
# https://gitlab-ncsa.ubisoft.org/help/ci/yaml/README.md
.test_base:
stage: pre_release
except:
variables:
- $CI_COMMIT_MESSAGE =~ /\[skip-tests\]/
tags:
- blender
variables:
MIXER_BASH_EXE: C:\Program Files\Git\bin\bash.exe
VRTIST_PORT: 25600 # In case a server is already running on our default port on the test computer
MIXER_TEST_OUTPUT: logs\tests
timeout: 2h
script:
- gitlab\run_unittest.bat
cache:
paths:
- gitlab/blender/cache
artifacts:
paths:
- logs\tests\*.xml
reports:
junit:
- logs\tests\*.xml
.test_version_dev:
variables:
MIXER_BLENDER_ZIP_BASENAME: blender-2.92.0-windows64
MIXER_BLENDER_VERSION_BASE: "2.92"
MIXER_BLENDER_DOWNLOAD: "release"
test_dev:
extends:
- .test_base
- .test_version_dev
- .except_nightly_test
.test_version_2.83.13:
extends:
- .test_base
variables:
MIXER_BLENDER_VERSION_BASE: "2.83"
MIXER_BLENDER_ZIP_BASENAME: blender-2.83.13-windows64
MIXER_BLENDER_DOWNLOAD: "release"
test_2.83.13:
extends:
- .test_version_2.83.13
- .only_nightly_test
- .except_on_gitlab.com
test_2.83.13_manual:
extends:
- .test_version_2.83.13
- .except_nightly_test
- .except_on_gitlab.com
when: manual
.test_version_2.91.2:
extends:
- .test_base
variables:
MIXER_BLENDER_VERSION_BASE: "2.91"
MIXER_BLENDER_ZIP_BASENAME: blender-2.91.2-windows64
MIXER_BLENDER_DOWNLOAD: "release"
test_2.91.2:
extends:
- .test_version_2.91.2
- .only_nightly_test
- .except_on_gitlab.com
test_2.91.2_manual:
extends:
- .test_version_2.91.2
- .except_nightly_test
- .except_on_gitlab.com
when: manual
.test_version_2.93.alpha:
extends:
- .test_base
variables:
MIXER_BLENDER_VERSION_BASE: "2.93"
# from https://builder.blender.org/download/
MIXER_BLENDER_ZIP_BASENAME: blender-2.93.${blender_alpha}-windows64
MIXER_BLENDER_DOWNLOAD: "builder"
test_2.93.alpha:
extends:
- .test_version_2.93.alpha
- .only_nightly_test
- .except_on_gitlab.com
test_2.93.alpha_manual:
extends:
- .test_version_2.93.alpha
- .except_nightly_test
- .except_on_gitlab.com
when: manual
test_gitlab.com:
extends:
- .test_base
- .test_version_dev
- .only_version_tag
- .only_on_gitlab.com
#########################################################################################
.deploy_network_folder:
stage: deploy
extends:
- .only_version_tag
- .except_on_gitlab.com
- .except_nightly_test
tags:
- linux
- uas_network_drive
script:
- bash gitlab/deploy_in_network_folder.sh mixer-${CI_COMMIT_REF_NAME}.zip
when: manual
.deploy_perforce_folder:
stage: deploy
extends:
- .only_version_tag
- .except_on_gitlab.com
- .except_nightly_test
tags:
- linux
- uas_perforce_client
script:
- bash gitlab/deploy_in_perforce_folder.sh mixer-${CI_COMMIT_REF_NAME}.zip
when: manual
deploy:incubator:
extends: .deploy_network_folder
environment:
name: incubator
deploy:rr_special:
extends: .deploy_perforce_folder
environment:
name: rr_special