-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.gitlab-ci.yml
307 lines (278 loc) · 7.53 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
variables:
download_url: "https://common-lisp.net/project/cmucl/downloads/snapshots/2024/08"
version: "2024-08-x86"
bootstrap: "-B boot-2024-08"
# Default install configuration to download the cmucl tarballs to use
# for building.
.install_template: &install_configuration
stage: install
artifacts:
paths:
- snapshot/
script:
- echo PATH = $PATH
- ls -F /usr/local/bin
- type -all gitlab-runner
# Download binaries. (Do we really need the extras tarball?)
- $CURL -o cmucl-$version-$osname.tar.bz2 $download_url/cmucl-$version-$osname.tar.bz2
- $CURL -o cmucl-$version-$osname.extra.tar.bz2 $download_url/cmucl-$version-$osname.extra.tar.bz2
- mkdir snapshot
- (cd snapshot; tar xjf ../cmucl-$version-$osname.tar.bz2; tar xjf ../cmucl-$version-$osname.extra.tar.bz2)
# Default build configuration to be added to each build stage for each
# OS. This assumes we don't need anything special between OSes, and
# the option '-C ""' is good enough. We also override the default
# build dirs by using the -b option so that we know where the results
# are, independent of OS.
.build_template: &build_configuration
stage: build
artifacts:
paths:
- dist/
- build-2/*.log
- build-3/*.log
- build-4/
# Needed by Linux analyzer stage
- src/lisp/cmucl-version.h
script:
# Do cross compile first
#- bin/create-target.sh xtarget x86_linux_clang
#- bin/create-target.sh xcross x86_linux_clang
#- bin/cross-build-world.sh -crl -B boot-2020-04-1 xtarget xcross src/tools/cross-scripts/cross-x86-x86.lisp snapshot/bin/lisp
# Regular build using the cross-compiled result or snapshot. The
# analyzer job requires gcc, so make sure we build with gcc here
# instead of clang.
- bin/build.sh $bootstrap -b build -R -C "" -o snapshot/bin/lisp
# When the result of `git describe` cannot be used as a version
# string, an alternative can be provided with the -V flag
- bin/make-dist.sh -I dist build-4
# Default configuration for running the ansi-tests.
.ansi_test_template: &ansi_test_configuration
stage: ansi-test
artifacts:
paths:
- ansi-test/test.out
script:
- bin/run-ansi-tests.sh -l dist/bin/lisp
# Default configuration for running unit tests.
.unit_test_template: &unit_test_configuration
stage: test
artifacts:
paths:
- ansi-test/test.out
- test.log
script:
- echo LANG = $LANG
- bin/run-unit-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
# Default configuration to test creation of lisp executable and
# testing the exectuable works.
.exec_test_template: &exec_test_configuration
stage: test
script:
# Create an executable and test it by printing the version.
- dist/bin/lisp -eval '(save-lisp "saved-lisp-executable" :executable t)'
- ./saved-lisp-executable --version
# Default configuration for running the benchmarks.
.benchmark_template: &benchmark_configuration
stage: benchmark
artifacts:
paths:
- benchmarks/cl-bench/results
script:
- cd benchmarks/cl-bench
- mkdir tmp
- CMUCL=../../snapshot/bin/lisp ./run-cmucl.sh
- CMUCL=../../dist/bin/lisp ./run-cmucl.sh
- ../../snapshot/bin/lisp -load report
stages:
- install
- build
- test
- ansi-test
- benchmark
- analyze
cache:
#### Linux jobs ####
linux:install:
<<: *install_configuration
tags:
- linux
variables:
osname: "linux"
CURL: "curl"
linux:build:
<<: *build_configuration
tags:
- linux
needs:
- job: linux:install
artifacts: true
linux:cross-build:
stage: build
tags:
- linux
artifacts:
paths:
- xdist/
- linux-2/*.log
- linux-3/*.log
- linux-4/*.log
# The lisp directory is needed for the static analyzer job.
- linux-4/lisp
needs:
# Normally need the linux:install stage to get the compiler to
# use. But for #337, we need the normal build from linux:build to
# do the cross-compile. Once the snapshot is made, we can use
# linux:install instead.
- job: linux:build
#- job: linux:install
artifacts: true
script:
- bin/create-target.sh xtarget
- bin/create-target.sh xcross
- bin/cross-build-world.sh -crl xtarget xcross src/tools/cross-scripts/cross-x86-x86.lisp dist/bin/lisp
- bin/build.sh -b xlinux $bootstrap -R -C "" -o "xtarget/lisp/lisp -lib xtarget/lisp"
- bin/make-dist.sh -I xdist xlinux-4
linux:test:
<<: *unit_test_configuration
tags:
- linux
needs:
# Needs artifacts from build (dist/)
- job: linux:build
artifacts: true
linux:exec-test:
<<: *exec_test_configuration
tags:
- linux
needs:
- job: linux:build
artifacts: true
linux:cross-test:
stage: test
tags:
- linux
artifacts:
paths:
- ansi-test/test.out
- cross-test.log
needs:
# Needs artifacts from build (dist/)
- job: linux:cross-build
artifacts: true
script:
- bin/run-unit-tests.sh -l xdist/bin/lisp 2>&1 | tee cross-test.log
linux:ansi-test:
<<: *ansi_test_configuration
tags:
- linux
needs:
# Needs artifacts from build (dist/)
- job: linux:build
artifacts: true
linux:benchmark:
<<: *benchmark_configuration
tags:
- linux
needs:
# Needs artifacts from install (snapshot/) and build (dist/)
- job: linux:install
artifacts: true
- job: linux:build
#### OSX (Mac) jobs ####
osx:install:
<<: *install_configuration
tags:
- macos-virtualbox
variables:
osname: "darwin"
CURL: "/opt/local/bin/curl"
osx:build:
<<: *build_configuration
tags:
- macos-virtualbox
needs:
- job: osx:install
artifacts: true
osx:test:
<<: *unit_test_configuration
tags:
- macos-virtualbox
needs:
# Needs artifacts from build (dist/)
- job: osx:build
artifacts: true
osx:exec-test:
<<: *exec_test_configuration
tags:
- macos-virtualbox
needs:
- job: osx:build
artifacts: true
osx:ansi-test:
<<: *ansi_test_configuration
tags:
- macos-virtualbox
needs:
# Needs artifacts from build (dist/)
- job: osx:build
artifacts: true
osx:benchmark:
<<: *benchmark_configuration
tags:
- macos-virtualbox
needs:
# Needs artifacts from install (snapshot/) and build (dist/)
- job: osx:install
artifacts: true
- job: osx:build
# Optional job that runs the static analyzer. It needs the files from
# the linux-4 directory built in the linux:build job.
linux:static-analyzer:
stage: analyze
when: manual
tags:
- linux
artifacts:
paths:
- analyzer.log
needs:
- job: linux:build
artifacts: true
script:
# Analysis can generate huge amounts of output. For now just save
# the results to the log file instead of also having it go to the
# console. If someday there's less or no output, we can consider
# having the logs go to the console too.
- make -C build-4/lisp clean
- make -C build-4/lisp CFLAGS=-fanalyzer > analyzer.log 2>&1
#### OpenSUSE jobs ####
opensuse:install:
<<: *install_configuration
tags:
- opensuse
variables:
osname: "linux"
CURL: "curl"
opensuse:build:
<<: *build_configuration
tags:
- opensuse
needs:
- job: opensuse:install
artifacts: true
opensuse:test:
<<: *unit_test_configuration
tags:
- opensuse
needs:
# Needs artifacts from build (dist/)
- job: opensuse:build
artifacts: true
opensuse:ansi-test:
<<: *ansi_test_configuration
tags:
- opensuse
needs:
# Needs artifacts from build (dist/)
- job: opensuse:build
artifacts: true