]> git.ipfire.org Git - thirdparty/bird.git/blame - .gitlab-ci.yml
Doc: BFD update
[thirdparty/bird.git] / .gitlab-ci.yml
CommitLineData
5c4dfe0c
MV
1variables:
2 DEBIAN_FRONTEND: noninteractive
98ef34c0 3 LC_ALL: C.UTF-8
5c4dfe0c
MV
4 GIT_STRATEGY: fetch
5 DOCKER_CMD: docker --config="$HOME/.docker/$CI_JOB_ID/"
75aceada 6 IMG_BASE: registry.nic.cz/labs/bird
c9b7b032
OZ
7 TOOLS_DIR: /home/gitlab-runner/bird-tools
8 STAYRTR_BINARY: /usr/bin/stayrtr
5c4dfe0c
MV
9
10stages:
a50d2fa6 11# - image
5c4dfe0c 12 - build
81666d2f 13 - pkg
faa43a75 14 - test
5c4dfe0c
MV
15
16.docker: &docker_build
17 stage: image
18 allow_failure: true
19 script:
75aceada 20 - $DOCKER_CMD login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.nic.cz
5c4dfe0c
MV
21 # Make sure we refresh the base image if it updates (eg. security updates, etc)
22 # If we do just the build, cache is always reused and the freshness of the
23 # base image is never checked. However, pull always asks and updates the
24 # image only if it changed ‒ therefore, the cache is used unless there's a
25 # change.
26 - $DOCKER_CMD pull `sed -ne 's/^FROM //p' "misc/docker/$IMG_NAME/Dockerfile"`
27 - $DOCKER_CMD build -t "bird:$IMG_NAME" "misc/docker/$IMG_NAME"
28 - $DOCKER_CMD tag "bird:$IMG_NAME" "$IMG_BASE:$IMG_NAME"
29 - $DOCKER_CMD push "$IMG_BASE:$IMG_NAME"
30 after_script:
31 - rm -f "$HOME/.docker/$CI_JOB_ID/" # cleanup the credentials
32 tags:
33 # That's Docker in Docker
34 - dind
35
a50d2fa6
OZ
36# Docker build example
37#docker_debian-11-amd64:
0c4dca7f 38# variables:
a50d2fa6 39# IMG_NAME: "debian-11-amd64"
0c4dca7f 40# <<: *docker_build
b646c009 41
81666d2f 42
0adfa0ec 43.build: &build-base
5c4dfe0c
MV
44 stage: build
45 script:
46 - autoreconf
4ff15a75 47 - ./configure CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS"
5c4dfe0c
MV
48 # Detect which make is available
49 - MAKE=make
50 - which gmake 2>/dev/null >/dev/null && MAKE=gmake
51 - $MAKE
cb5df823 52 - $MAKE check
445d0e69
OZ
53 # Build docs when tools are available
54 - if which linuxdoc pdflatex >/dev/null ; then $MAKE docs ; fi
5c4dfe0c 55
0adfa0ec
OZ
56.build-linux: &build-linux
57 <<: *build-base
58 tags:
59 - docker
60 - linux
61 - amd64
62
5c4dfe0c 63build-debian-9-amd64:
0adfa0ec 64 <<: *build-linux
75aceada 65 image: registry.nic.cz/labs/bird:debian-9-amd64
0adfa0ec
OZ
66
67build-debian-9-i386:
68 <<: *build-linux
75aceada 69 image: registry.nic.cz/labs/bird:debian-9-i386
5c4dfe0c 70
92249894
MH
71build-debian-10-amd64:
72 <<: *build-linux
75aceada 73 image: registry.nic.cz/labs/bird:debian-10-amd64
92249894
MH
74
75build-debian-10-i386:
76 <<: *build-linux
75aceada 77 image: registry.nic.cz/labs/bird:debian-10-i386
92249894 78
b646c009
M
79build-debian-11-amd64:
80 <<: *build-linux
75aceada 81 image: registry.nic.cz/labs/bird:debian-11-amd64
b646c009 82
0c4dca7f
MH
83#build-debian-11-i386:
84# <<: *build-linux
75aceada 85# image: registry.nic.cz/labs/bird:debian-11-i386
b646c009 86
5c4dfe0c 87build-debian-testing-amd64:
0adfa0ec 88 <<: *build-linux
75aceada 89 image: registry.nic.cz/labs/bird:debian-testing-amd64
0adfa0ec 90
0c4dca7f
MH
91#build-debian-testing-i386:
92# <<: *build-linux
75aceada 93# image: registry.nic.cz/labs/bird:debian-testing-i386
5c4dfe0c 94
5c4dfe0c 95build-fedora-25-amd64:
0adfa0ec 96 <<: *build-linux
75aceada 97 image: registry.nic.cz/labs/bird:fedora-25-amd64
5c4dfe0c 98
5c4dfe0c 99build-fedora-26-amd64:
0adfa0ec 100 <<: *build-linux
75aceada 101 image: registry.nic.cz/labs/bird:fedora-26-amd64
5c4dfe0c 102
92249894
MH
103build-fedora-27-amd64:
104 <<: *build-linux
75aceada 105 image: registry.nic.cz/labs/bird:fedora-27-amd64
92249894
MH
106
107build-fedora-28-amd64:
108 <<: *build-linux
75aceada 109 image: registry.nic.cz/labs/bird:fedora-28-amd64
92249894
MH
110
111build-fedora-29-amd64:
112 <<: *build-linux
75aceada 113 image: registry.nic.cz/labs/bird:fedora-29-amd64
92249894
MH
114
115build-fedora-30-amd64:
116 <<: *build-linux
75aceada 117 image: registry.nic.cz/labs/bird:fedora-30-amd64
92249894
MH
118
119build-fedora-31-amd64:
120 <<: *build-linux
75aceada 121 image: registry.nic.cz/labs/bird:fedora-31-amd64
92249894 122
b646c009
M
123build-fedora-32-amd64:
124 <<: *build-linux
75aceada 125 image: registry.nic.cz/labs/bird:fedora-32-amd64
b646c009
M
126
127build-fedora-33-amd64:
128 <<: *build-linux
75aceada 129 image: registry.nic.cz/labs/bird:fedora-33-amd64
b646c009
M
130
131build-fedora-34-amd64:
132 <<: *build-linux
75aceada 133 image: registry.nic.cz/labs/bird:fedora-33-amd64
b646c009 134
90f41760
OZ
135#build-centos-7-amd64:
136# <<: *build-linux
137# image: registry.nic.cz/labs/bird:centos-7-amd64
5c4dfe0c 138
92249894 139build-centos-8-amd64:
0adfa0ec 140 <<: *build-linux
75aceada 141 image: registry.nic.cz/labs/bird:centos-8-amd64
5c4dfe0c 142
5c4dfe0c 143build-ubuntu-16_04-amd64:
0adfa0ec 144 <<: *build-linux
75aceada 145 image: registry.nic.cz/labs/bird:ubuntu-16.04-amd64
5c4dfe0c 146
92249894
MH
147build-ubuntu-18_04-amd64:
148 <<: *build-linux
75aceada 149 image: registry.nic.cz/labs/bird:ubuntu-18.04-amd64
92249894 150
b646c009 151build-ubuntu-20_04-amd64:
92249894 152 <<: *build-linux
75aceada 153 image: registry.nic.cz/labs/bird:ubuntu-20.04-amd64
b646c009 154
a9646efd 155build-ubuntu-21_10-amd64:
b646c009 156 <<: *build-linux
a9646efd 157 image: registry.nic.cz/labs/bird:ubuntu-21.10-amd64
b646c009 158
0c4dca7f
MH
159#build-ubuntu-21_04-amd64:
160# <<: *build-linux
75aceada 161# image: registry.nic.cz/labs/bird:ubuntu-21.04-amd64
92249894
MH
162
163build-opensuse-15.0-amd64:
164 <<: *build-linux
75aceada 165 image: registry.nic.cz/labs/bird:opensuse-15.0-amd64
92249894
MH
166
167build-opensuse-15.1-amd64:
168 <<: *build-linux
75aceada 169 image: registry.nic.cz/labs/bird:opensuse-15.1-amd64
92249894 170
b646c009
M
171build-opensuse-15.2-amd64:
172 <<: *build-linux
75aceada 173 image: registry.nic.cz/labs/bird:opensuse-15.2-amd64
b646c009
M
174
175build-opensuse-15.3-amd64:
176 <<: *build-linux
75aceada 177 image: registry.nic.cz/labs/bird:opensuse-15.3-amd64
b646c009 178
9e60b500
OZ
179#build-freebsd-11-amd64:
180# <<: *build-base
181# tags:
182# - freebsd
183# - amd64
184
185#build-freebsd-11-i386:
186# <<: *build-base
187# tags:
188# - freebsd
189# - i386
5176455f 190
81666d2f 191
0c4dca7f 192.pkg-deb: &pkg-deb
81666d2f
OZ
193 stage: pkg
194 script:
0c4dca7f
MH
195 - pip3 install apkg
196 - apkg build
197 #- apkg install -y pkg/pkgs/*/*/*.deb
198 artifacts:
199 paths:
200 - pkg/pkgs/*
201
202.pkg-rpm: &pkg-rpm
203 stage: pkg
204 script:
205 - pip3 install apkg
206 - apkg build
207 #- apkg install -y pkg/pkgs/*/*/*.rpm
208 artifacts:
209 paths:
210 - pkg/pkgs/*
211
212.pkg-rpm-wa: &pkg-rpm-wa
213 stage: pkg
214 script:
215 - sed -i "s/runstatedir/with-runtimedir/" distro/pkg/rpm/bird.spec
216 - pip3 install apkg
217 - apkg build
218 #- apkg install -y pkg/pkgs/*/*/*.rpm
219 artifacts:
220 paths:
221 - pkg/pkgs/*
222
81666d2f 223pkg-debian-10-amd64:
0c4dca7f 224 <<: *pkg-deb
81666d2f 225 needs: [build-debian-10-amd64]
75aceada 226 image: registry.nic.cz/labs/bird:debian-10-amd64
81666d2f
OZ
227
228pkg-debian-10-i386:
0c4dca7f 229 <<: *pkg-deb
81666d2f 230 needs: [build-debian-10-i386]
75aceada 231 image: registry.nic.cz/labs/bird:debian-10-i386
81666d2f
OZ
232
233pkg-debian-11-amd64:
0c4dca7f 234 <<: *pkg-deb
81666d2f 235 needs: [build-debian-11-amd64]
75aceada 236 image: registry.nic.cz/labs/bird:debian-11-amd64
81666d2f 237
0c4dca7f
MH
238pkg-fedora-30-amd64:
239 <<: *pkg-rpm-wa
240 needs: [build-fedora-30-amd64]
75aceada 241 image: registry.nic.cz/labs/bird:fedora-30-amd64
0c4dca7f
MH
242
243pkg-fedora-31-amd64:
244 <<: *pkg-rpm-wa
245 needs: [build-fedora-31-amd64]
75aceada 246 image: registry.nic.cz/labs/bird:fedora-31-amd64
0c4dca7f
MH
247
248pkg-fedora-32-amd64:
249 <<: *pkg-rpm-wa
250 needs: [build-fedora-32-amd64]
75aceada 251 image: registry.nic.cz/labs/bird:fedora-32-amd64
0c4dca7f
MH
252
253pkg-fedora-33-amd64:
254 <<: *pkg-rpm-wa
255 needs: [build-fedora-33-amd64]
75aceada 256 image: registry.nic.cz/labs/bird:fedora-33-amd64
0c4dca7f
MH
257
258pkg-fedora-34-amd64:
259 <<: *pkg-rpm
260 needs: [build-fedora-34-amd64]
75aceada 261 image: registry.nic.cz/labs/bird:fedora-34-amd64
0c4dca7f 262
90f41760
OZ
263#pkg-centos-7-amd64:
264# <<: *pkg-rpm-wa
265# variables:
266# LC_ALL: en_US.UTF-8
267# needs: [build-centos-7-amd64]
268# image: registry.nic.cz/labs/bird:centos-7-amd64
0c4dca7f
MH
269
270pkg-centos-8-amd64:
271 <<: *pkg-rpm-wa
272 needs: [build-centos-8-amd64]
75aceada 273 image: registry.nic.cz/labs/bird:centos-8-amd64
0c4dca7f
MH
274
275pkg-ubuntu-18.04-amd64:
276 <<: *pkg-deb
277 needs: [build-ubuntu-18_04-amd64]
75aceada 278 image: registry.nic.cz/labs/bird:ubuntu-18.04-amd64
0c4dca7f
MH
279
280pkg-ubuntu-20.04-amd64:
281 <<: *pkg-deb
282 needs: [build-ubuntu-20_04-amd64]
75aceada 283 image: registry.nic.cz/labs/bird:ubuntu-20.04-amd64
0c4dca7f 284
a9646efd
MH
285
286pkg-ubuntu-21.10-amd64:
0c4dca7f 287 <<: *pkg-deb
a9646efd
MH
288 needs: [build-ubuntu-21_10-amd64]
289 image: registry.nic.cz/labs/bird:ubuntu-21.10-amd64
0c4dca7f
MH
290
291#pkg-ubuntu-21.04-amd64:
292# <<: *pkg-deb
293# needs: [build-ubuntu-21_04-amd64]
75aceada 294# image: registry.nic.cz/labs/bird:ubuntu-21.04-amd64
0c4dca7f
MH
295
296pkg-opensuse-15.1-amd64:
297 <<: *pkg-rpm-wa
298 needs: [build-opensuse-15.1-amd64]
75aceada 299 image: registry.nic.cz/labs/bird:opensuse-15.1-amd64
0c4dca7f
MH
300
301pkg-opensuse-15.2-amd64:
302 <<: *pkg-rpm-wa
303 needs: [build-opensuse-15.2-amd64]
75aceada 304 image: registry.nic.cz/labs/bird:opensuse-15.2-amd64
0c4dca7f
MH
305
306pkg-opensuse-15.3-amd64:
307 <<: *pkg-rpm-wa
308 needs: [build-opensuse-15.3-amd64]
75aceada 309 image: registry.nic.cz/labs/bird:opensuse-15.3-amd64
0c4dca7f 310
81666d2f 311
c9b7b032 312build-netlab:
faa43a75 313 stage: build
5176455f 314 tags:
c9b7b032 315 - netlab
faa43a75
OZ
316 - amd64
317 script:
318 - DIR=$(pwd)
319 - autoreconf
320 - ./configure
321 - make
322 - cd $TOOLS_DIR
323 - sudo git clean -fx
324 - git pull --ff-only
6a314d26 325 - mv $DIR/bird $DIR/birdc netlab/common
84545a26 326 - ln -s $STAYRTR_BINARY netlab/common/stayrtr
faa43a75 327
0adfa0ec 328.test: &test-base
faa43a75 329 stage: test
c9b7b032 330 needs: [build-netlab]
faa43a75 331 tags:
c9b7b032 332 - netlab
faa43a75
OZ
333 - amd64
334 script:
6a314d26 335 - cd $TOOLS_DIR/netlab
1ad98965 336 - sudo ./stop
84545a26 337 - sudo ./runtest -s v2 -m check $TEST_NAME
148bd9ee 338
ead531ff 339test-ospf-base:
0adfa0ec 340 <<: *test-base
148bd9ee 341 variables:
ead531ff
OZ
342 TEST_NAME: cf-ospf-base
343
344test-ospf-default:
345 <<: *test-base
346 variables:
347 TEST_NAME: cf-ospf-default
348
349test-ospf-priority:
350 <<: *test-base
351 variables:
352 TEST_NAME: cf-ospf-priority
353
354test-ospf-nbma:
355 <<: *test-base
356 variables:
357 TEST_NAME: cf-ospf-nbma
358
359test-ospf-ptmp:
360 <<: *test-base
361 variables:
362 TEST_NAME: cf-ospf-ptmp
363
0c4dca7f
MH
364test-ospf-authentication:
365 <<: *test-base
366 variables:
367 TEST_NAME: cf-ospf-authentication
ead531ff
OZ
368
369test-ospf-bfd:
370 <<: *test-base
371 variables:
372 TEST_NAME: cf-ospf-bfd
373
374test-ospf-custom:
375 <<: *test-base
376 variables:
377 TEST_NAME: cf-ospf-custom
3c838ad9 378
bcb25084
OZ
379test-ospf-area:
380 <<: *test-base
381 variables:
382 TEST_NAME: cf-ospf-area
383
716e11a5
OZ
384test-ospf-vrf:
385 <<: *test-base
386 variables:
387 TEST_NAME: cf-ospf-vrf
388
3c838ad9
OZ
389test-bgp-base:
390 <<: *test-base
391 variables:
392 TEST_NAME: cf-bgp-base
b465604e
OZ
393
394test-bgp-auth:
395 <<: *test-base
396 variables:
397 TEST_NAME: cf-bgp-auth
f7c34aa2
OZ
398
399test-bgp-int:
400 <<: *test-base
401 variables:
402 TEST_NAME: cf-bgp-int
f1ffe6a2
OZ
403
404test-bgp-merged:
405 <<: *test-base
406 variables:
407 TEST_NAME: cf-bgp-merged
408
84545a26
MM
409test-bgp-flowspec:
410 <<: *test-base
411 variables:
412 TEST_NAME: cf-bgp-flowspec
413
414test-bgp-rs-multitab:
415 <<: *test-base
416 variables:
417 TEST_NAME: cf-bgp-rs-multitab
418
f1ffe6a2
OZ
419test-ebgp-loop:
420 <<: *test-base
421 variables:
422 TEST_NAME: cf-ebgp-loop
423
424test-ebgp-star:
425 <<: *test-base
426 variables:
427 TEST_NAME: cf-ebgp-star
428
84545a26
MM
429test-ebgp-role:
430 <<: *test-base
431 variables:
432 TEST_NAME: cf-ebgp-role
433
434test-ebgp-graceful:
435 <<: *test-base
436 variables:
437 TEST_NAME: cf-ebgp-graceful
438
439test-ebgp-import-limit:
440 <<: *test-base
441 variables:
442 TEST_NAME: cf-ebgp-import-limit
443
f1ffe6a2
OZ
444test-ibgp-loop:
445 <<: *test-base
446 variables:
447 TEST_NAME: cf-ibgp-loop
448
84545a26
MM
449test-ibgp-loop-big:
450 <<: *test-base
451 variables:
452 TEST_NAME: cf-ibgp-loop-big
453
454test-ibgp-flat:
f1ffe6a2
OZ
455 <<: *test-base
456 variables:
457 TEST_NAME: cf-ibgp-flat
3f19100f
OZ
458
459test-babel-base:
460 <<: *test-base
461 variables:
462 TEST_NAME: cf-babel-base
463
464test-babel-auth:
465 <<: *test-base
466 variables:
467 TEST_NAME: cf-babel-auth
bcb25084
OZ
468
469test-rip-base:
470 <<: *test-base
471 variables:
472 TEST_NAME: cf-rip-base
84545a26
MM
473
474test-kernel-learn:
475 <<: *test-base
476 variables:
477 TEST_NAME: cf-kernel-learn
ff38ee59 478
59730314
OZ
479test-mpls-bgp:
480 <<: *test-base
481 variables:
482 TEST_NAME: cf-mpls-bgp
483
484test-mpls-bgp-l3vpn:
485 <<: *test-base
486 variables:
487 TEST_NAME: cf-mpls-bgp-l3vpn
488
ff38ee59
OZ
489
490.build-birdlab-base: &build-birdlab-base
491 stage: build
492 script:
493 - autoreconf
494 - ./configure
495 - gmake
496 - gmake check
497
498build-birdlab-debian-11:
499 <<: *build-birdlab-base
500 tags:
501 - birdlab-debian-11
502 - amd64
503
504build-birdlab-centos-08:
505 <<: *build-birdlab-base
506 tags:
507 - birdlab-centos-08
508 - amd64
509
510build-birdlab-fedora-37:
511 <<: *build-birdlab-base
512 tags:
513 - birdlab-fedora-37
514 - amd64
515
516build-birdlab-freebsd-13:
517 <<: *build-birdlab-base
518 tags:
519 - birdlab-freebsd-13
520 - amd64
521
522build-birdlab-openbsd-71:
523 <<: *build-birdlab-base
524 variables:
525 AUTOCONF_VERSION: "2.71"
526 tags:
527 - birdlab-openbsd-71
528 - amd64