doc: fix doxyen complaints after fd6c9b8ca0ec0791c
[platform/upstream/libevdev.git] / .gitlab-ci.yml
1 ########################################
2 #                                      #
3 # THIS FILE IS GENERATED, DO NOT EDIT  #
4 #                                      #
5 ########################################
6
7 .templates_sha: &template_sha ca99d9418390fb5faaa7f2407b94c733d7ec6a37 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
8
9 include:
10   # Alpine container builder template
11   - project: 'freedesktop/ci-templates'
12     ref: *template_sha
13     file: '/templates/alpine.yml'
14   # Arch container builder template
15   - project: 'freedesktop/ci-templates'
16     ref: *template_sha
17     file: '/templates/arch.yml'
18   # Centos container builder template
19   - project: 'freedesktop/ci-templates'
20     ref: *template_sha
21     file: '/templates/centos.yml'
22   # Debian container builder template
23   - project: 'freedesktop/ci-templates'
24     ref: *template_sha
25     file: '/templates/debian.yml'
26   # Fedora container builder template
27   - project: 'freedesktop/ci-templates'
28     ref: *template_sha
29     file: '/templates/fedora.yml'
30   # Ubuntu container builder template
31   - project: 'freedesktop/ci-templates'
32     ref: *template_sha
33     file: '/templates/ubuntu.yml'
34
35 stages:
36   - prep             # rebuild the container images if there is a change
37   - build            # for actually building and testing things in a container
38   - VM               # for running the test suite in a VM
39   - autotools        # distribution builds with autotools
40   - meson            # distribution builds with meson
41   - tarballs         # tarball builds
42   - container_clean  # clean up unused container images
43   - merge-check      # check for a merge request
44
45 variables:
46   # The upstrem repository we will check for images
47   FDO_UPSTREAM_REPO: libevdev/libevdev
48   LIBEVDEV_SKIP_ROOT_TESTS: 1
49   GIT_DEPTH: 1
50   MESON_BUILDDIR: 'build dir'
51
52 .default_artifacts:
53   artifacts:
54     paths:
55       - _build/test/test-suite.log
56       - $MESON_BUILDDIR/meson-logs/
57     expire_in: 1 week
58     when: on_failure
59     reports:
60       junit: $MESON_BUILDDIR/junit-*.xml
61
62 .autotools_build:
63   extends:
64     - .default_artifacts
65   script:
66     - mkdir _build
67     - pushd _build > /dev/null
68     - ../autogen.sh --disable-silent-rules $CONFIGURE_FLAGS
69     - make
70     - make check
71     - if ! [[ -z "$MAKE_ARGS" ]]; then make $MAKE_ARGS; fi
72     - popd > /dev/null
73
74 .meson_build:
75   extends:
76     - .default_artifacts
77   script:
78     - .gitlab-ci/meson-build.sh
79
80 .fedora:31:
81   extends: .fdo.distribution-image@fedora
82   variables:
83     FDO_DISTRIBUTION_TAG: '2020-09-11.0'
84     FDO_DISTRIBUTION_VERSION: '31'
85
86 .fedora:32:
87   extends: .fdo.distribution-image@fedora
88   variables:
89     FDO_DISTRIBUTION_TAG: '2020-09-11.0'
90     FDO_DISTRIBUTION_VERSION: '32'
91
92 .ubuntu:20.04:
93   extends: .fdo.distribution-image@ubuntu
94   variables:
95     FDO_DISTRIBUTION_TAG: '2020-09-11.0'
96     FDO_DISTRIBUTION_VERSION: '20.04'
97
98 .ubuntu:19.10:
99   extends: .fdo.distribution-image@ubuntu
100   variables:
101     FDO_DISTRIBUTION_TAG: '2020-09-11.0'
102     FDO_DISTRIBUTION_VERSION: '19.10'
103
104 .debian:stable:
105   extends: .fdo.distribution-image@debian
106   variables:
107     FDO_DISTRIBUTION_TAG: '2020-09-11.0'
108     FDO_DISTRIBUTION_VERSION: 'stable'
109
110 .debian:sid:
111   extends: .fdo.distribution-image@debian
112   variables:
113     FDO_DISTRIBUTION_TAG: '2020-09-11.0'
114     FDO_DISTRIBUTION_VERSION: 'sid'
115
116 .centos:7:
117   extends: .fdo.distribution-image@centos
118   variables:
119     FDO_DISTRIBUTION_TAG: '2020-09-11.0'
120     FDO_DISTRIBUTION_VERSION: '7'
121
122 .centos:8:
123   extends: .fdo.distribution-image@centos
124   variables:
125     FDO_DISTRIBUTION_TAG: '2020-09-11.0'
126     FDO_DISTRIBUTION_VERSION: '8'
127
128 .arch:rolling:
129   extends: .fdo.distribution-image@arch
130   variables:
131     FDO_DISTRIBUTION_TAG: '2020-09-11.0'
132     FDO_DISTRIBUTION_VERSION: 'rolling'
133
134 .alpine:latest:
135   extends: .fdo.distribution-image@alpine
136   variables:
137     FDO_DISTRIBUTION_TAG: '2020-09-11.0'
138     FDO_DISTRIBUTION_VERSION: 'latest'
139
140
141
142 #################################################################
143 #                                                               #
144 #                          prep stage                           #
145 #                                                               #
146 #################################################################
147
148 # Re-generate the CI script and make sure it's the one currently checked in
149 # If this job fails, re-generate the gitlab-ci.yml script, see
150 # $SRCDIR/.gitlab-ci/generate-gitlab-ci.py
151 #
152 check-ci-script:
153   image: golang:alpine
154   stage: prep
155   before_script:
156     - apk add python3 py-pip git
157     - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
158   script:
159     - ci-fairy generate-template
160     - git diff --exit-code && exit 0 || true
161     - echo "Committed gitlab-ci.yml differs from generated gitlab-ci.yml. Please verify"
162     - exit 1
163
164 #
165 # Verify that commit messages are as expected, signed-off, etc.
166 #
167
168 check-commit:
169   image: golang:alpine
170   stage: prep
171   before_script:
172     - apk add python3 py-pip git
173     - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
174   script:
175     - ci-fairy check-commits --signed-off-by --junit-xml=results.xml
176   except:
177     - master@libevdev/libevdev
178   variables:
179     GIT_DEPTH: 100
180   artifacts:
181     reports:
182       junit: results.xml
183
184 #
185 # Verify that the merge request has the allow-collaboration checkbox ticked
186 #
187
188 check-merge-request:
189   image: golang:alpine
190   stage: merge-check
191   before_script:
192     - apk add python3 py-pip git
193     - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
194   script:
195     - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
196   artifacts:
197     when: on_failure
198     reports:
199       junit: results.xml
200   allow_failure: true
201
202
203 .fedora.packages:
204   variables:
205     FDO_DISTRIBUTION_PACKAGES: 'git gcc gcc-c++ meson automake autoconf libtool make pkgconfig python3 check-devel valgrind binutils doxygen xz clang-analyzer'
206
207 .ubuntu.packages:
208   variables:
209     FDO_DISTRIBUTION_PACKAGES: 'git gcc g++ meson automake autoconf libtool make pkg-config python3 check valgrind binutils doxygen xz-utils'
210
211 .debian.packages:
212   variables:
213     FDO_DISTRIBUTION_PACKAGES: 'git gcc g++ meson automake autoconf libtool make pkg-config python3 check valgrind binutils doxygen xz-utils'
214
215 .centos.packages:
216   variables:
217     FDO_DISTRIBUTION_PACKAGES: 'git gcc gcc-c++ automake autoconf libtool make pkgconfig python3 check-devel valgrind binutils xz'
218
219 .arch.packages:
220   variables:
221     FDO_DISTRIBUTION_PACKAGES: 'git gcc meson automake autoconf libtool make pkgconfig python3 check valgrind binutils doxygen'
222
223 .alpine.packages:
224   variables:
225     FDO_DISTRIBUTION_PACKAGES: 'git gcc g++ meson automake autoconf libtool make pkgconfig python3 check-dev valgrind binutils doxygen xz linux-headers'
226
227
228 # Pulls in the qemu container from upstream or rebuilds it if missing
229 .fedora:31@qemu-prep:
230   extends:
231     - .fedora:31
232     - .fedora.packages
233     - .fdo.qemu-build@fedora
234   stage: prep
235   tags:
236     - kvm
237   variables:
238     GIT_STRATEGY: none
239     FDO_DISTRIBUTION_TAG: qemu-2020-09-11.0
240   allow_failure: true
241
242 # Always rebuilds the container
243 .fedora:31@qemu-forced-rebuild:
244   extends:
245     - .fedora:31@qemu-prep
246   variables:
247     FDO_FORCE_REBUILD: 1
248   only:
249     - schedules
250
251 # Pulls in the qemu container from upstream or rebuilds it if missing
252 .fedora:32@qemu-prep:
253   extends:
254     - .fedora:32
255     - .fedora.packages
256     - .fdo.qemu-build@fedora
257   stage: prep
258   tags:
259     - kvm
260   variables:
261     GIT_STRATEGY: none
262     FDO_DISTRIBUTION_TAG: qemu-2020-09-11.0
263   allow_failure: true
264
265 # Always rebuilds the container
266 .fedora:32@qemu-forced-rebuild:
267   extends:
268     - .fedora:32@qemu-prep
269   variables:
270     FDO_FORCE_REBUILD: 1
271   only:
272     - schedules
273
274
275 # This is the actual job
276 fedora:32@qemu-prep:
277   extends: .fedora:32@qemu-prep
278
279 fedora:32@qemu-forced-rebuild:
280   extends: .fedora:32@qemu-forced-rebuild
281
282
283 # Pulls in the container from upstream or rebuilds it if missing
284 fedora:31@container-prep:
285   extends:
286     - .fedora:31
287     - .fedora.packages
288     - .fdo.container-build@fedora
289   stage: prep
290   variables:
291     GIT_STRATEGY: none
292
293 # Always rebuilds the container
294 fedora:31@container-forced-rebuild:
295   extends:
296     - fedora:31@container-prep
297   only:
298     - schedules
299   variables:
300     FDO_FORCE_REBUILD: 1
301
302
303 # Pulls in the container from upstream or rebuilds it if missing
304 fedora:32@container-prep:
305   extends:
306     - .fedora:32
307     - .fedora.packages
308     - .fdo.container-build@fedora
309   stage: prep
310   variables:
311     GIT_STRATEGY: none
312
313 # Always rebuilds the container
314 fedora:32@container-forced-rebuild:
315   extends:
316     - fedora:32@container-prep
317   only:
318     - schedules
319   variables:
320     FDO_FORCE_REBUILD: 1
321
322
323 # Pulls in the container from upstream or rebuilds it if missing
324 ubuntu:20.04@container-prep:
325   extends:
326     - .ubuntu:20.04
327     - .ubuntu.packages
328     - .fdo.container-build@ubuntu
329   stage: prep
330   variables:
331     GIT_STRATEGY: none
332
333 # Always rebuilds the container
334 ubuntu:20.04@container-forced-rebuild:
335   extends:
336     - ubuntu:20.04@container-prep
337   only:
338     - schedules
339   variables:
340     FDO_FORCE_REBUILD: 1
341
342
343 # Pulls in the container from upstream or rebuilds it if missing
344 ubuntu:19.10@container-prep:
345   extends:
346     - .ubuntu:19.10
347     - .ubuntu.packages
348     - .fdo.container-build@ubuntu
349   stage: prep
350   variables:
351     GIT_STRATEGY: none
352
353 # Always rebuilds the container
354 ubuntu:19.10@container-forced-rebuild:
355   extends:
356     - ubuntu:19.10@container-prep
357   only:
358     - schedules
359   variables:
360     FDO_FORCE_REBUILD: 1
361
362
363 # Pulls in the container from upstream or rebuilds it if missing
364 debian:stable@container-prep:
365   extends:
366     - .debian:stable
367     - .debian.packages
368     - .fdo.container-build@debian
369   stage: prep
370   variables:
371     GIT_STRATEGY: none
372
373 # Always rebuilds the container
374 debian:stable@container-forced-rebuild:
375   extends:
376     - debian:stable@container-prep
377   only:
378     - schedules
379   variables:
380     FDO_FORCE_REBUILD: 1
381
382
383 # Pulls in the container from upstream or rebuilds it if missing
384 debian:sid@container-prep:
385   extends:
386     - .debian:sid
387     - .debian.packages
388     - .fdo.container-build@debian
389   stage: prep
390   variables:
391     GIT_STRATEGY: none
392
393 # Always rebuilds the container
394 debian:sid@container-forced-rebuild:
395   extends:
396     - debian:sid@container-prep
397   only:
398     - schedules
399   variables:
400     FDO_FORCE_REBUILD: 1
401
402
403 # Pulls in the container from upstream or rebuilds it if missing
404 centos:7@container-prep:
405   extends:
406     - .centos:7
407     - .centos.packages
408     - .fdo.container-build@centos
409   stage: prep
410   variables:
411     GIT_STRATEGY: none
412
413 # Always rebuilds the container
414 centos:7@container-forced-rebuild:
415   extends:
416     - centos:7@container-prep
417   only:
418     - schedules
419   variables:
420     FDO_FORCE_REBUILD: 1
421
422
423 # Pulls in the container from upstream or rebuilds it if missing
424 centos:8@container-prep:
425   extends:
426     - .centos:8
427     - .centos.packages
428     - .fdo.container-build@centos
429   stage: prep
430   variables:
431     GIT_STRATEGY: none
432
433 # Always rebuilds the container
434 centos:8@container-forced-rebuild:
435   extends:
436     - centos:8@container-prep
437   only:
438     - schedules
439   variables:
440     FDO_FORCE_REBUILD: 1
441
442
443 # Pulls in the container from upstream or rebuilds it if missing
444 arch:rolling@container-prep:
445   extends:
446     - .arch:rolling
447     - .arch.packages
448     - .fdo.container-build@arch
449   stage: prep
450   variables:
451     GIT_STRATEGY: none
452
453 # Always rebuilds the container
454 arch:rolling@container-forced-rebuild:
455   extends:
456     - arch:rolling@container-prep
457   only:
458     - schedules
459   variables:
460     FDO_FORCE_REBUILD: 1
461
462
463 # Pulls in the container from upstream or rebuilds it if missing
464 alpine:latest@container-prep:
465   extends:
466     - .alpine:latest
467     - .alpine.packages
468     - .fdo.container-build@alpine
469   stage: prep
470   variables:
471     GIT_STRATEGY: none
472
473 # Always rebuilds the container
474 alpine:latest@container-forced-rebuild:
475   extends:
476     - alpine:latest@container-prep
477   only:
478     - schedules
479   variables:
480     FDO_FORCE_REBUILD: 1
481
482
483 #################################################################
484 #                                                               #
485 #                   container clean stage                       #
486 #                 run during the clean stage                    #
487 #                                                               #
488 #################################################################
489
490 #
491 # This stage will look for the container images we currently have in
492 # the registry and will remove any that are not tagged with the provided
493 # $container_image:$tag
494 .container-clean:
495   stage: container_clean
496   image: golang:alpine
497   before_script:
498     - apk add python3 py-pip git
499     - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
500   script:
501     # Go to your Profile, Settings, Access Tokens
502     # Create a personal token with 'api' scope, copy the value.
503     # Go to CI/CD, Schedules, schedule a new monthly job (or edit the existing one)
504     # Define a variable of type File named AUTHFILE. Content is that token
505     # value.
506     - ci-fairy -v --authfile $AUTHFILE delete-image
507             --repository $FDO_DISTRIBUTION_NAME/$FDO_DISTRIBUTION_VERSION
508             --exclude-tag $FDO_DISTRIBUTION_TAG
509   dependencies: []
510   allow_failure: true
511   only:
512     - schedules
513
514 ### fedora 31
515 fedora:31@container-clean:
516   extends:
517     - .fedora:31
518     - .container-clean
519   needs: ["fedora:31@container-prep"]
520
521 ### fedora 32
522 fedora:32@container-clean:
523   extends:
524     - .fedora:32
525     - .container-clean
526   needs: ["fedora:32@container-prep"]
527
528 ### ubuntu 20.04
529 ubuntu:20.04@container-clean:
530   extends:
531     - .ubuntu:20.04
532     - .container-clean
533   needs: ["ubuntu:20.04@container-prep"]
534
535 ### ubuntu 19.10
536 ubuntu:19.10@container-clean:
537   extends:
538     - .ubuntu:19.10
539     - .container-clean
540   needs: ["ubuntu:19.10@container-prep"]
541
542 ### debian stable
543 debian:stable@container-clean:
544   extends:
545     - .debian:stable
546     - .container-clean
547   needs: ["debian:stable@container-prep"]
548
549 ### debian sid
550 debian:sid@container-clean:
551   extends:
552     - .debian:sid
553     - .container-clean
554   needs: ["debian:sid@container-prep"]
555
556 ### centos 7
557 centos:7@container-clean:
558   extends:
559     - .centos:7
560     - .container-clean
561   needs: ["centos:7@container-prep"]
562
563 ### centos 8
564 centos:8@container-clean:
565   extends:
566     - .centos:8
567     - .container-clean
568   needs: ["centos:8@container-prep"]
569
570 ### arch rolling
571 arch:rolling@container-clean:
572   extends:
573     - .arch:rolling
574     - .container-clean
575   needs: ["arch:rolling@container-prep"]
576
577 ### alpine latest
578 alpine:latest@container-clean:
579   extends:
580     - .alpine:latest
581     - .container-clean
582   needs: ["alpine:latest@container-prep"]
583
584
585 #################################################################
586 #                                                               #
587 #                       build stage                             #
588 #                                                               #
589 #################################################################
590
591 .autotools-build@template:
592   extends:
593     - .autotools_build
594   stage: build
595   dependencies: []
596   variables:
597     MAKE_ARGS: "distcheck"
598
599 .meson-build@template:
600   extends:
601     - .meson_build
602   stage: build
603   dependencies: []
604   variables:
605     NINJA_ARGS: "dist"
606
607
608 fedora:31@autotools-build:
609   extends:
610     - .fedora:31
611     - .autotools-build@template
612   stage: autotools
613   needs: ['fedora:31@container-prep']
614
615 fedora:31@meson-build:
616   extends:
617     - .fedora:31
618     - .meson-build@template
619   stage: meson
620   needs: ['fedora:31@container-prep']
621
622
623 fedora:32@autotools-build:
624   extends:
625     - .fedora:32
626     - .autotools-build@template
627   stage: autotools
628   needs: ['fedora:32@container-prep']
629
630 fedora:32@meson-build:
631   extends:
632     - .fedora:32
633     - .meson-build@template
634   stage: meson
635   needs: ['fedora:32@container-prep']
636
637
638 ubuntu:20.04@autotools-build:
639   extends:
640     - .ubuntu:20.04
641     - .autotools-build@template
642   stage: autotools
643   needs: ['ubuntu:20.04@container-prep']
644
645 ubuntu:20.04@meson-build:
646   extends:
647     - .ubuntu:20.04
648     - .meson-build@template
649   stage: meson
650   needs: ['ubuntu:20.04@container-prep']
651
652
653 ubuntu:19.10@autotools-build:
654   extends:
655     - .ubuntu:19.10
656     - .autotools-build@template
657   stage: autotools
658   needs: ['ubuntu:19.10@container-prep']
659
660 ubuntu:19.10@meson-build:
661   extends:
662     - .ubuntu:19.10
663     - .meson-build@template
664   stage: meson
665   needs: ['ubuntu:19.10@container-prep']
666
667
668 debian:stable@autotools-build:
669   extends:
670     - .debian:stable
671     - .autotools-build@template
672   stage: autotools
673   needs: ['debian:stable@container-prep']
674
675 debian:stable@meson-build:
676   extends:
677     - .debian:stable
678     - .meson-build@template
679   stage: meson
680   needs: ['debian:stable@container-prep']
681
682
683 debian:sid@autotools-build:
684   extends:
685     - .debian:sid
686     - .autotools-build@template
687   stage: autotools
688   needs: ['debian:sid@container-prep']
689
690 debian:sid@meson-build:
691   extends:
692     - .debian:sid
693     - .meson-build@template
694   stage: meson
695   needs: ['debian:sid@container-prep']
696
697
698 centos:7@autotools-build:
699   extends:
700     - .centos:7
701     - .autotools-build@template
702   stage: autotools
703   variables:
704     MAKE_ARGS: ''  # disable distcheck, requires doxygen
705   needs: ['centos:7@container-prep']
706
707
708
709 centos:8@autotools-build:
710   extends:
711     - .centos:8
712     - .autotools-build@template
713   stage: autotools
714   variables:
715     MAKE_ARGS: ''  # disable distcheck, requires doxygen
716   needs: ['centos:8@container-prep']
717
718
719
720 arch:rolling@autotools-build:
721   extends:
722     - .arch:rolling
723     - .autotools-build@template
724   stage: autotools
725   needs: ['arch:rolling@container-prep']
726
727 arch:rolling@meson-build:
728   extends:
729     - .arch:rolling
730     - .meson-build@template
731   stage: meson
732   needs: ['arch:rolling@container-prep']
733
734
735 alpine:latest@autotools-build:
736   extends:
737     - .alpine:latest
738     - .autotools-build@template
739   stage: autotools
740   needs: ['alpine:latest@container-prep']
741
742 alpine:latest@meson-build:
743   extends:
744     - .alpine:latest
745     - .meson-build@template
746   stage: meson
747   needs: ['alpine:latest@container-prep']
748
749
750 # Build argument tests
751 #
752 # We only run the build option combinations on one image
753 # because they're supposed to fail equally on all
754 .fedora-custom-build@autotools-template:
755   extends:
756     - .fedora:31
757     - .autotools-build@template
758   stage: build
759   needs: ['fedora:31@container-prep']
760
761 no-valgrind:autotools:
762   extends: .fedora-custom-build@autotools-template
763   before_script:
764     - dnf remove -y valgrind
765
766 no-check:autotools:
767   extends: .fedora-custom-build@autotools-template
768   before_script:
769     - dnf remove -y check check-devel
770
771 no-doxygen:autotools:
772   extends: .fedora-custom-build@autotools-template
773   before_script:
774     - dnf remove -y doxygen
775   variables:
776     MAKE_ARGS: ''  # disable distcheck, requires doxygen
777
778 # doxygen is required for distcheck
779 no-doxygen-check-valgrind:autotools:
780   extends: .fedora-custom-build@autotools-template
781   before_script:
782     - dnf remove -y doxygen valgrind check check-devel
783   variables:
784     MAKE_ARGS: ''  # disable distcheck, requires doxygen
785
786 no-nm:autotools:
787   extends: .fedora-custom-build@autotools-template
788   before_script:
789     - mv /usr/bin/nm /usr/bin/nm.moved
790
791 enable-gcov:autotools:
792   extends: .fedora-custom-build@autotools-template
793   variables:
794     CONFIGURE_FLAGS: "--enable-gcov"
795
796 .fedora-custom-build@meson-template:
797   extends:
798     - .fedora:31
799     - .meson-build@template
800   stage: build
801   needs: ['fedora:31@container-prep']
802
803 no-valgrind:meson:
804   extends: .fedora-custom-build@meson-template
805   before_script:
806     - dnf remove -y valgrind
807
808 no-check:meson:
809   extends: .fedora-custom-build@meson-template
810   before_script:
811     - dnf remove -y check check-devel
812   variables:
813     MESON_ARGS: -Dtests=disabled
814     SKIP_MESON_TEST: 1
815
816 # doxygen is required for dist
817 no-doxygen:meson:
818   extends: .fedora-custom-build@meson-template
819   before_script:
820     - dnf remove -y doxygen
821   variables:
822     MESON_ARGS: -Ddocumentation=disabled
823     NINJA_ARGS: ''
824
825 # doxygen is required for dist
826 no-doxygen-check-valgrind:meson:
827   extends: .fedora-custom-build@meson-template
828   before_script:
829     - dnf remove -y doxygen valgrind check check-devel
830   variables:
831     MESON_ARGS: -Dtests=disabled -Ddocumentation=disabled
832     NINJA_ARGS: ''
833     SKIP_MESON_TEST: 1
834
835 enable-gcov:meson:
836   extends: .fedora-custom-build@meson-template
837   variables:
838     MESON_ARGS: '-Dcoverity=true'
839
840 scan-build:meson:
841   extends: .fedora-custom-build@meson-template
842   variables:
843     NINJA_ARGS: 'scan-build'
844     SKIP_MESON_TEST: 1
845
846 static-build:meson:
847   extends: .fedora-custom-build@meson-template
848   script:
849     - meson "$MESON_BUILDDIR" --default-library=static --prefix=$PWD/prefix-meson/
850     - ninja -C "$MESON_BUILDDIR" install
851     - ls -l $PWD/prefix-meson/lib64/libevdev.a
852
853 soname:
854   extends:
855     - .fedora:31
856   stage: build
857   script:
858   - ./autogen.sh --prefix=$PWD/prefix-autotools/
859   - make install
860   - ls -l $PWD/prefix-autotools/lib/libevdev.so.2.3.0
861   - meson "$MESON_BUILDDIR" --prefix=$PWD/prefix-meson/
862   - ninja -C "$MESON_BUILDDIR" install
863   - ls -l $PWD/prefix-meson/lib64/libevdev.so.2.3.0
864   needs: ['fedora:31@container-prep']
865
866 #################################################################
867 #                                                               #
868 #                          VM stage                             #
869 #                                                               #
870 #################################################################
871
872 .check_tainted: &check_tainted |
873   # make sure the kernel is not tainted
874   if [[ "$(ssh localhost -p 5555 cat /proc/sys/kernel/tainted)" -gt 0 ]];
875   then
876     echo tainted kernel ;
877     exit 1 ;
878   fi
879
880 .qemu@fedora:32:
881   extends:
882     - .fedora:32
883   stage: VM
884   image: $CI_REGISTRY_IMAGE/$FDO_DISTRIBUTION_NAME/$FDO_DISTRIBUTION_VERSION:qemu-$FDO_DISTRIBUTION_TAG
885   tags:
886     - kvm
887   variables:
888     MESON_BUILDDIR: build_dir
889   script:
890     # start our vm, no args required
891     - /app/start_vm.sh
892
893     - *check_tainted
894
895     - "scp -P 5555 -r $PWD localhost:"
896     - echo "CI_JOB_ID=\"$CI_JOB_ID\"" > sshenv
897     - echo "CI_JOB_NAME=\"$CI_JOB_NAME\"" >> sshenv
898     - echo "MESON_BUILDDIR=\"$MESON_BUILDDIR\"" >> sshenv
899     - echo "MESON_TEST_ARGS=\"$MESON_TEST_ARGS\"" >> sshenv
900     - echo "NINJA_ARGS=\"$NINJA_ARGS\"" >> sshenv
901     - "scp -P 5555 sshenv localhost:~/$CI_PROJECT_NAME/.meson_environment"
902     - ssh localhost -p 5555 "cd $CI_PROJECT_NAME ; .gitlab-ci/meson-build.sh" && touch .success || true
903     # no matter the results of the tests, we want to fetch the logs
904     - scp -P 5555 -r localhost:$CI_PROJECT_NAME/"$MESON_BUILDDIR" .
905
906     - *check_tainted
907
908     - ssh localhost -p 5555 halt || true
909     - sleep 2
910     - pkill qemu || true
911
912     - if [[ ! -e .success ]] ;
913       then
914         exit 1 ;
915       fi
916   artifacts:
917     name: "qemu-meson-logs-$CI_JOB_NAME"
918     when: always
919     expire_in: 1 week
920     paths:
921       - $MESON_BUILDDIR/meson-logs
922       - console.out
923     reports:
924       junit: $MESON_BUILDDIR/junit-*.xml
925
926   retry:
927     max: 2
928     when: script_failure
929   needs: ['fedora:32@qemu-prep']
930
931 qemu:meson:
932   extends: .qemu@fedora:32
933
934 qemu:meson:valgrind:
935   extends: .qemu@fedora:32
936   variables:
937     MESON_TEST_ARGS: '--setup=valgrind'
938
939 meson-from-tarball:
940   extends:
941     - .fedora:32
942   stage: tarballs
943   script:
944     - export INSTALLDIR="$PWD/_inst"
945     - mkdir _build
946     - pushd _build > /dev/null
947     - ../autogen.sh --disable-silent-rules $CONFIGURE_FLAGS
948     - make
949     - make distcheck
950     - popd > /dev/null
951     - mkdir -p _tarball_dir
952     - tar xf _build/libevdev-*.tar.xz -C _tarball_dir
953     - pushd _tarball_dir/libevdev-*/ > /dev/null
954     - meson "$MESON_BUILDDIR" --prefix="$INSTALLDIR"
955     - ninja -C "$MESON_BUILDDIR" test
956     - ninja -C "$MESON_BUILDDIR" install
957     - popd > /dev/null
958     - ls -lR $INSTALLDIR
959   needs: ['fedora:32@container-prep']
960
961 autotools-from-tarball:
962   extends:
963     - .fedora:32
964   stage: tarballs
965   script:
966     - export INSTALLDIR="$PWD/_inst"
967     - meson "$MESON_BUILDDIR"
968     - ninja -C "$MESON_BUILDDIR" dist
969     - mkdir -p _tarball_dir
970     - tar xf "$MESON_BUILDDIR"/meson-dist/libevdev-*.xz -C _tarball_dir
971     - pushd _tarball_dir/libevdev-*/ > /dev/null
972     - mkdir _build
973     - pushd _build > /dev/null
974     - ../autogen.sh --disable-silent-rules --prefix="$INSTALLDIR" $CONFIGURE_FLAGS
975     - make
976     - make install
977     - make distcheck
978     - popd > /dev/null
979     - popd > /dev/null
980     - ls -lR $INSTALLDIR
981   needs: ['fedora:32@container-prep']