forked from gobo-eiffel/gobo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
293 lines (272 loc) · 7.27 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
variables:
GOBO: '$CI_PROJECT_DIR'
#
# Build Gobo tools.
#
build_ge:
stage: build_ge
dependencies: []
script:
- Write-Host "Just to define the 'build_ge' stage name"
rules:
- when: never
linux_gcc_build_ge:
stage: build_ge
tags:
- linux
image:
# See: https://stackoverflow.com/questions/44319313/how-do-i-use-powershell-with-gitlab-ci-in-gitlab-pages
name: "mcr.microsoft.com/powershell:latest"
dependencies: []
script:
- pwsh -f "$GOBO/.cicd/build_ge.ps1" gitlab gcc
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_MERGE_REQUEST_ID
when: never
- if: $GOBO_CUSTOM_PIPELINE == null || $GOBO_CUSTOM_PIPELINE == "linux_test_ise"
when: on_success
artifacts:
when: always
expire_in: 3 hours
paths:
- $GOBO/bin/
- $GOBO/tool/gec/backend/c/config/default.cfg
windows_msc_build_ge:
stage: build_ge
tags:
- shared-windows
- windows
- windows-1809
dependencies: []
script:
- . "$GOBO/.cicd/build_ge.ps1" gitlab msc
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_MERGE_REQUEST_ID
when: never
- if: $GOBO_CUSTOM_PIPELINE == null || $GOBO_CUSTOM_PIPELINE == "windows_test_ise"
when: on_success
artifacts:
when: always
expire_in: 3 hours
paths:
- $GOBO/bin/
- $GOBO/tool/gec/backend/c/config/default.cfg
#
# Running tests with Gobo Eiffel.
#
test_ge:
stage: test_ge
dependencies: []
script:
- Write-Host "Just to define the 'test_ge' stage name"
rules:
- when: never
library_linux_gcc_test_ge:
stage: test_ge
tags:
- linux
image:
# See: https://stackoverflow.com/questions/44319313/how-do-i-use-powershell-with-gitlab-ci-in-gitlab-pages
name: "mcr.microsoft.com/powershell:latest"
dependencies:
- linux_gcc_build_ge
script:
- pwsh -f "$GOBO/.cicd/test_ge.ps1" gitlab gcc ge library
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_MERGE_REQUEST_ID
when: never
- if: $GOBO_CUSTOM_PIPELINE == null
when: on_success
tool_linux_gcc_test_ge:
stage: test_ge
tags:
- linux
image:
# See: https://stackoverflow.com/questions/44319313/how-do-i-use-powershell-with-gitlab-ci-in-gitlab-pages
name: "mcr.microsoft.com/powershell:latest"
dependencies:
- linux_gcc_build_ge
script:
- pwsh -f "$GOBO/.cicd/test_ge.ps1" gitlab gcc ge tool
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_MERGE_REQUEST_ID
when: never
- if: $GOBO_CUSTOM_PIPELINE == null
when: on_success
library_windows_msc_test_ge:
stage: test_ge
tags:
- shared-windows
- windows
- windows-1809
dependencies:
- windows_msc_build_ge
script:
# The tests in `$GOBO\library\lexical` are failing in GitLab CI/CD when using `geant test_ge`.
# So use `geant test_debug_ge` instead.
- . "$GOBO/.cicd/test_ge.ps1" gitlab msc debug_ge library
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_MERGE_REQUEST_ID
when: never
- if: $GOBO_CUSTOM_PIPELINE == null
when: on_success
# We have `tool_no_gec_windows_msc_test_ge` and `tool_gec_windows_msc_test_ge`,
# instead of just `tool_windows_msc_test_ge`, because it takes more than
# 1 hour to run this job and the job timeout on GitLab runners for Windows
# is set to 1 hour (even though it is set to 2 hours for the project).
tool_no_gec_windows_test_ge:
stage: test_ge
tags:
- shared-windows
- windows
- windows-1809
dependencies:
- windows_msc_build_ge
script:
- Remove-Item "$GOBO/tool/gec/test" -Force -Recurse
- . "$GOBO/.cicd/test_ge.ps1" gitlab msc ge tool
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_MERGE_REQUEST_ID
when: never
- if: $GOBO_CUSTOM_PIPELINE == null
when: on_success
tool_gec_windows_msc_test_ge:
stage: test_ge
tags:
- shared-windows
- windows
- windows-1809
dependencies:
- windows_msc_build_ge
script:
- . "$GOBO/.cicd/test_ge.ps1" gitlab msc ge tool/gec
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_MERGE_REQUEST_ID
when: never
- if: $GOBO_CUSTOM_PIPELINE == null
when: on_success
#
# Running tests with ISE Eiffel.
#
library_linux_gcc_test_ise:
stage: test_ge
tags:
- linux
image:
# See: https://stackoverflow.com/questions/44319313/how-do-i-use-powershell-with-gitlab-ci-in-gitlab-pages
name: "mcr.microsoft.com/powershell:latest"
dependencies:
- linux_gcc_build_ge
script:
- pwsh -f "$GOBO/.cicd/test_ge.ps1" gitlab gcc debug_ise library
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_MERGE_REQUEST_ID
when: never
- if: $GOBO_CUSTOM_PIPELINE == "linux_gcc_test_ise"
when: on_success
timeout: 3 hours
tool_linux_gcc_test_ise:
stage: test_ge
tags:
- linux
image:
# See: https://stackoverflow.com/questions/44319313/how-do-i-use-powershell-with-gitlab-ci-in-gitlab-pages
name: "mcr.microsoft.com/powershell:latest"
dependencies:
- linux_gcc_build_ge
script:
- pwsh -f "$GOBO/.cicd/test_ge.ps1" gitlab gcc debug_ise tool
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_MERGE_REQUEST_ID
when: never
- if: $GOBO_CUSTOM_PIPELINE == "linux_gcc_test_ise"
when: on_success
timeout: 3 hours
# We have `library_no_xslt_windows_msc_test_ise` and `library_xslt_msc_windows_test_ise`,
# instead of just `library_windows_msc_test_ise`, because it takes more than
# 1 hour to run this job and the job timeout on GitLab runners for Windows
# is set to 1 hour (even though it is set to 2 hours for the project).
library_no_xslt_windows_msc_test_ise:
stage: test_ge
tags:
- shared-windows
- windows
- windows-1809
dependencies:
- windows_msc_build_ge
script:
- Remove-Item "$GOBO/library/xslt/test" -Force -Recurse
# Use ISE Eiffel in finalized mode because it takes more than
# 1 hour to run this job in workbench mode and the job timeout
# on GitLab runners for Windows is set to 1 hour (even though
# it is set to 2 hours for the project).
- . "$GOBO/.cicd/test_ge.ps1" gitlab msc ise library
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_MERGE_REQUEST_ID
when: never
- if: $GOBO_CUSTOM_PIPELINE == "windows_msc_test_ise"
when: on_success
library_xslt_windows_msc_test_ise:
stage: test_ge
tags:
- shared-windows
- windows
- windows-1809
dependencies:
- windows_msc_build_ge
script:
# Use ISE Eiffel in finalized mode because it takes more than
# 1 hour to run this job in workbench mode and the job timeout
# on GitLab runners for Windows is set to 1 hour (even though
# it is set to 2 hours for the project).
- . "$GOBO/.cicd/test_ge.ps1" gitlab msc ise library/xslt
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_MERGE_REQUEST_ID
when: never
- if: $GOBO_CUSTOM_PIPELINE == "windows_msc_test_ise"
when: on_success
tool_windows_msc_test_ise:
stage: test_ge
tags:
- shared-windows
- windows
- windows-1809
dependencies:
- windows_msc_build_ge
script:
- . "$GOBO/.cicd/test_ge.ps1" gitlab msc debug_ise tool
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_MERGE_REQUEST_ID
when: never
- if: $GOBO_CUSTOM_PIPELINE == "windows_msc_test_ise"
when: on_success
#
# Stages.
#
stages:
- build_ge
- test_ge