-
Notifications
You must be signed in to change notification settings - Fork 6
/
.gitlab-ci.yml
508 lines (478 loc) · 13.6 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
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
variables:
GIT_SUBMODULE_STRATEGY: normal
BUILD_IMAGES_PROJECT: gnutls/build-images
FEDORA_BUILD: buildenv-fedora33
GET_SOURCES_ATTEMPTS: "3"
.test:
artifacts:
expire_in: 2 weeks
when: always
paths:
- "*.tar.gz"
- ./*.log
- ./config.h
- ./**/*.log
# See http://doc.gitlab.com/ce/ci/yaml/ for documentation.
x86-64:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
stage: build
script:
- yum remove -y libtasn1-devel
- ./bootstrap
- ./configure --disable-doc && make -j$(nproc)
- make syntax-check
- make -j$(nproc) check
- make dist
except:
- tags
tags:
- shared
artifacts:
expire_in: 1 week
when: on_failure
paths:
- libtasn1-*.tar.gz
- ./*.log
- ./tests/*.log
artifacts:
expire_in: 1 week
when: on_success
paths:
- libtasn1-*.tar.gz
Debian10-bootstrap:
image: debian:10-slim
stage: build
before_script:
- apt-get update -qq | tail
- env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq make git autoconf automake libtool bison texinfo texlive texlive-generic-recommended texlive-extra-utils help2man gtk-doc-tools valgrind abigail-tools | tail
script:
- ./bootstrap
- mkdir b
- cd b
- ../configure --enable-gcc-warnings
- make -j$(nproc)
- make -j$(nproc) check
- make abi-check
- make syntax-check distcheck
- git diff --exit-code # nothing should change version controlled files
artifacts:
expire_in: 2 weeks
when: on_success
paths:
- b/libtasn1-*.tar.gz
Debian11-bootstrap:
image: debian:11-slim
stage: build
before_script:
- apt-get update -qq
- env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq make git autoconf automake libtool bison texinfo help2man gtk-doc-tools valgrind abigail-tools indent codespell | tail
script:
- ./bootstrap
- ./configure --enable-gcc-warnings
- make -j$(nproc)
- make -j$(nproc) check
- make abi-check
- make syntax-check dist
- git diff --exit-code # nothing should change version controlled files
artifacts:
expire_in: 2 weeks
when: on_success
paths:
- libtasn1-*.tar.gz
Debian-testing-bootstrap:
image: debian:testing-slim
stage: build
before_script:
- apt-get update -qq
- env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq make git autoconf automake libtool bison texinfo help2man gtk-doc-tools valgrind abigail-tools indent codespell | tail
script:
- ./bootstrap
- ./configure --enable-gcc-warnings
- make -j$(nproc)
- make -j$(nproc) check
- make syntax-check distcheck
- git diff --exit-code # nothing should change version controlled files
artifacts:
expire_in: 2 weeks
when: on_success
paths:
- libtasn1-*.tar.gz
valgrind/werror:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
script:
- yum remove -y libtasn1-devel
- ./bootstrap
- CFLAGS="-O2 -g -Werror" ./configure --disable-doc --enable-valgrind-tests && make -j$(nproc)
- make -j$(nproc) check
except:
- tags
tags:
- shared
artifacts:
expire_in: 1 week
when: on_failure
paths:
- ./*.log
- ./tests/*.log
clang:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
script:
- yum remove -y libtasn1-devel
- ./bootstrap
- CC=clang ./configure --disable-doc --disable-valgrind-tests && make -j$(nproc)
- make check -j$(nproc)
except:
- tags
tags:
- shared
artifacts:
expire_in: 1 week
when: on_failure
paths:
- ./*.log
- ./tests/*.log
asan:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
script:
- yum remove -y libtasn1-devel
- ./bootstrap
- CFLAGS="-fsanitize=address -g -O2" LDFLAGS="-static-libasan" ./configure --disable-doc --disable-valgrind-tests && make -j$(nproc) && make check -j$(nproc)
except:
- tags
tags:
- shared
artifacts:
expire_in: 1 week
when: on_failure
paths:
- ./*.log
- ./tests/*.log
ubsan:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
script:
- yum remove -y libtasn1-devel
- ./bootstrap
- CFLAGS="-fsanitize=undefined -fno-sanitize-recover -g -O2" ./configure --disable-doc --disable-valgrind-tests && make -j$(nproc) && make check -j$(nproc)
tags:
- shared
except:
- tags
artifacts:
expire_in: 1 week
when: on_failure
paths:
- ./*.log
- ./tests/*.log
MinGW32-bootstrap:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
script:
- dnf install -y wine.i686 mingw32-gcc util-linux
- dnf remove -y mingw32-libtasn1
- mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
- echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register
- ./bootstrap && rm -f tests/suite/mini-eagain2.c && mkdir -p build && cd build &&
mingw32-configure --disable-doc --disable-valgrind-tests &&
mingw32-make -j$(nproc) && mingw32-make -C tests check -j$(nproc)
tags:
- shared
- docker
except:
- tags
artifacts:
expire_in: 1 week
when: on_failure
paths:
- build/*.log
- build/tests/*.log
- build/tests/*/*.log
gnutls:
when: manual # takes ~1 hour...
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
script:
- yum remove -y libtasn1-devel
- ./bootstrap
- ./configure --disable-doc --prefix=/usr --libdir=/usr/lib64 &&
make -j$(nproc) && make install
- git clone --depth 1 --branch master https://gitlab.com/gnutls/gnutls.git gnutls-git
- cd gnutls-git && git submodule update --init && ./bootstrap &&
./configure --disable-cxx --disable-guile --disable-doc && make -j$(nproc) &&
make -j $(nproc) check
tags:
- shared
except:
- tags
artifacts:
expire_in: 1 week
when: on_failure
paths:
- gnutls-git/guile/tests/*.log
- gnutls-git/tests/*.log
- gnutls-git/*.log
- gnutls-git/tests/*/*.log
- gnutls-git/tests/suite/*/*.log
static-analyzers:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
script:
- ./bootstrap
- scan-build ./configure --disable-doc
- make -j$(nproc) syntax-check
- make -j$(nproc) -C lib/gl
- make -j$(nproc) -C lib ASN1.lo
- scan-build --status-bugs -o scan-build-lib make -j$(nproc) -C lib
tags:
- shared
except:
- tags
artifacts:
expire_in: 1 week
when: on_failure
paths:
- scan-build-lib/
armcross:
extends: .test
image: debian:11-slim
stage: test
needs: [Debian11-bootstrap]
before_script:
- apt-get update -qq
- env DEBIAN_FRONTEND=noninteractive apt-get install -y -q make gcc-arm-linux-gnueabi qemu-user qemu-user-binfmt file
- update-binfmts --enable qemu-arm
script:
- tar xfa libtasn1-*.tar.gz
- cd `ls -d libtasn1-* | grep -v tar.gz`
- mkdir b
- cd b
- ../configure --host=arm-linux-gnueabi --enable-gcc-warnings CFLAGS="-static --static"
- make V=1
- arm-linux-gnueabi-readelf -h lib/.libs/libtasn1.a
- arm-linux-gnueabi-readelf -h src/asn1Parser
- file src/asn1Parser
- LANG=C.UTF-8 qemu-arm src/asn1Parser -c ../tests/pkix.asn
- make check
Mingw32:
extends: .test
image: debian:11-slim
stage: test
needs: [Debian11-bootstrap]
before_script:
- dpkg --add-architecture i386
- apt-get update -qq
- env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq make mingw-w64 wine wine32 libwine libwine:i386 binfmt-support wine-binfmt
- update-binfmts --enable wine
script:
- tar xfa libtasn1-*.tar.gz
- cd `ls -d libtasn1-* | grep -v tar.gz`
- ./configure --host=i686-w64-mingw32 CC='i686-w64-mingw32-gcc -static-libgcc' --enable-gcc-warnings
- make check V=1
Mingw64:
extends: .test
image: debian:11-slim
stage: test
needs: [Debian11-bootstrap]
before_script:
- apt-get update -qq
- env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq make mingw-w64 wine wine64 binfmt-support wine-binfmt
- update-binfmts --enable wine
script:
- tar xfa libtasn1-*.tar.gz
- cd `ls -d libtasn1-* | grep -v tar.gz`
- ./configure --host=x86_64-w64-mingw32 --enable-gcc-warnings
- make check V=1
Alpine:
extends: .test
image: alpine:latest
stage: test
needs: [Debian11-bootstrap]
before_script:
- echo "ipv6" >> /etc/modules
- apk update
- apk add build-base
script:
- tar xfa libtasn1-*.tar.gz
- cd `ls -d libtasn1-* | grep -v tar.gz`
- ./configure --enable-gcc-warnings
- sed -i 's/UNKNOWN/10.11.12/g' tests/version.c # XXX FIXME alpine bug?
- make check V=1
ArchLinux:
extends: .test
image: archlinux:latest
stage: test
needs: [Debian11-bootstrap]
before_script:
- pacman -Sy --noconfirm make gcc diffutils
script:
- tar xfa libtasn1-*.tar.gz
- cd `ls -d libtasn1-* | grep -v tar.gz`
- ./configure --enable-gcc-warnings
- make check V=1
CentOS7-distcheck:
extends: .test
image: centos:7
stage: test
needs: [Debian11-bootstrap]
before_script:
- yum -y install make gcc diffutils valgrind gtk-doc texinfo
script:
- tar xfa libtasn1-*.tar.gz
- cd `ls -d libtasn1-* | grep -v tar.gz`
- sed -i -e 's/ --sort=name//' GNUmakefile # C7's tar too old for 'make dist'
- ./configure --enable-gcc-warnings
- make distcheck V=1 TEXI2DVI=true
AlmaLinux8-c89:
extends: .test
image: almalinux:8
stage: test
needs: [Debian11-bootstrap]
before_script:
- yum -y install make gcc diffutils
script:
- tar xfz libtasn1-*.tar.gz
- cd `ls -d libtasn1-* | grep -v tar.gz`
- ./configure --enable-gcc-warnings ac_cv_prog_cc_c11=-std=c89
- make check V=1 VERBOSE=t WERROR_CFLAGS='-Dinline= -Werror -Wno-error=unused-function -Wno-error=nested-externs -Wno-error=implicit-function-declaration'
Debian4:
extends: .test
image: debian/eol:etch
stage: test
needs: [Debian11-bootstrap]
before_script:
- apt-get update -qq
- env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq make gcc libc-dev
- dpkg -l | cat
script:
- tar xfz libtasn1-*.tar.gz
- cd `ls -d libtasn1-* | grep -v tar.gz`
- ./configure --enable-gcc-warnings
- make check V=1 VERBOSE=t
Debian8-distcheck:
extends: .test
image: debian/eol:jessie
stage: test
needs: [x86-64]
before_script:
- apt-get update -qq
- env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq make gcc gtk-doc-tools texinfo
script:
- tar xfa libtasn1-*.tar.gz
- cd `ls -d libtasn1-* | grep -v tar.gz`
- ./configure --enable-gcc-warnings
- make distcheck V=1 TEXI2DVI=true
Debian9-distcheck:
extends: .test
image: debian:9-slim
stage: test
needs: [x86-64]
before_script:
- apt-get update -qq
- env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq make gcc gtk-doc-tools texinfo texlive texlive-generic-recommended texlive-extra-utils
script:
- tar xfa libtasn1-*.tar.gz
- cd `ls -d libtasn1-* | grep -v tar.gz`
- ./configure --enable-gcc-warnings
- make distcheck V=1
Debian11-distcheck:
extends: .test
image: debian:11-slim
stage: test
needs: [Debian11-bootstrap]
before_script:
- apt-get update -qq
- env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq make gcc gtk-doc-tools texinfo
script:
- tar xfa libtasn1-*.tar.gz
- cd `ls -d libtasn1-* | grep -v tar.gz`
- ./configure --enable-gcc-warnings
- make distcheck V=1
Ubuntu-latest-distcheck:
extends: .test
image: ubuntu:latest
stage: test
needs: [Debian11-bootstrap]
before_script:
- apt-get update -qq
- env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq make gcc gtk-doc-tools texinfo
script:
- tar xfa libtasn1-*.tar.gz
- cd `ls -d libtasn1-* | grep -v tar.gz`
- ./configure --enable-gcc-warnings
- make distcheck V=1
Ubuntu-rolling-distcheck:
extends: .test
image: ubuntu:rolling
stage: test
needs: [Debian11-bootstrap]
before_script:
- apt-get update -qq
- env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq make gcc gtk-doc-tools texinfo
script:
- tar xfa libtasn1-*.tar.gz
- cd `ls -d libtasn1-* | grep -v tar.gz`
- ./configure --enable-gcc-warnings
- make distcheck V=1
tcc-lld:
extends: .test
image: debian:11-slim
stage: test
needs: [Debian11-bootstrap]
before_script:
- apt-get update -qq
- env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq make tcc binutils lld
script:
- tar xfa libtasn1-*.tar.gz
- cd `ls -d libtasn1-* | grep -v tar.gz`
- ./configure CC=tcc LD=lld --disable-shared
- make check V=1 VERBOSE=t
pcc:
extends: .test
image: debian:11-slim
stage: test
needs: [Debian11-bootstrap]
before_script:
- apt-get update -qq
- env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq make pcc binutils libc6-dev libtasn1-bin
script:
- tar xfa libtasn1-*.tar.gz
- cd `ls -d libtasn1-* | grep -v tar.gz`
- ./configure CC=pcc
- make V=1 VERBOSE=t -C lib
- make V=1 VERBOSE=t -C fuzz check
- sed -i 's/exit 1/exit 77/' tests/parser.sh
- sed -i 's/diff/diff -u/' tests/parser.sh
- ln -s /usr/bin/asn1Parser src/
- ln -s /usr/bin/asn1Decoding src/
- ln -s /usr/bin/asn1Coding src/
- make V=1 VERBOSE=t -C tests check
.pages:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
script:
- dnf install -y dblatex
- ./bootstrap
- CFLAGS="-g -Og" dash ./configure --enable-code-coverage --enable-gtk-doc --enable-gtk-doc-pdf --disable-gcc-warnings
- mkdir -p public
- make -j$(nproc)
- make -j$(nproc) check
- make local-code-coverage-output || true
- make -C doc libtasn1.html libtasn1.pdf
- mv doc/libtasn1.pdf doc/libtasn1.html public/
- cp -ar GNU*-coverage/ public/coverage
- cp public/libtasn1.html public/index.html
- rm -rf public/reference
- mv doc/reference/html public/reference
- mv doc/reference/libtasn1.pdf public/reference/
- make web-manual
- rm -rf public/manual
- mv doc/manual public/manual
tags:
- shared
artifacts:
when: on_success
paths:
- public
pages:
extends: .pages
only:
- master
pages-test:
extends: .pages
except:
- master