forked from ubisoft/mixer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
143 lines (130 loc) · 3.4 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
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:
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
zip:
tags:
- docker
image: alpine
stage: pre_release
script:
- cp CHANGELOG.md README.md LICENSE mixer/
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
.exclude_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
.on_version_tag:
only:
refs:
# see inject_version.py
- /^v([0-9]+)\.([0-9]+)\.([0-9]+)(\-[0-9A-Za-z-]+)?(\+[0-9A-Za-z-]+)?$/
release:
extends: .on_version_tag
dependencies:
- zip
tags:
- docker
image: python:3
stage: release
script:
- pip install requests
- 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
.base_unittest:
stage: pre_release
tags:
- blender
variables:
MIXER_BLENDER_ZIP_BASENAME: blender-2.91.0-windows64
MIXER_BLENDER_VERSION_BASE: "2.91"
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
unittest:
extends:
- .base_unittest
except:
variables:
- $CI_COMMIT_MESSAGE =~ /\[skip-tests\]/
- $CI_SERVER_URL == "https://gitlab.com"
unittest_gitlab.com:
extends:
- .base_unittest
except:
variables:
- $CI_COMMIT_MESSAGE =~ /\[skip-tests\]/
only:
refs:
# see inject_version.py
- /^v([0-9]+)\.([0-9]+)\.([0-9]+)(\-[0-9A-Za-z-]+)?(\+[0-9A-Za-z-]+)?$/
variables:
- $CI_SERVER_URL == "https://gitlab.com"
.deploy_network_folder:
extends:
- .on_version_tag
- .exclude_on_gitlab.com
stage: deploy
tags:
- linux
- uas_network_drive
script:
- bash gitlab/deploy_in_network_folder.sh mixer-${CI_COMMIT_REF_NAME}.zip
when: manual
.deploy_perforce_folder:
extends:
- .on_version_tag
- .exclude_on_gitlab.com
stage: deploy
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