1 ########################################
3 # THIS FILE IS GENERATED, DO NOT EDIT #
5 ########################################
7 .templates_sha: &template_sha ca99d9418390fb5faaa7f2407b94c733d7ec6a37 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
10 # Alpine container builder template
11 - project: 'freedesktop/ci-templates'
13 file: '/templates/alpine.yml'
14 # Arch container builder template
15 - project: 'freedesktop/ci-templates'
17 file: '/templates/arch.yml'
18 # Centos container builder template
19 - project: 'freedesktop/ci-templates'
21 file: '/templates/centos.yml'
22 # Debian container builder template
23 - project: 'freedesktop/ci-templates'
25 file: '/templates/debian.yml'
26 # Fedora container builder template
27 - project: 'freedesktop/ci-templates'
29 file: '/templates/fedora.yml'
30 # Ubuntu container builder template
31 - project: 'freedesktop/ci-templates'
33 file: '/templates/ubuntu.yml'
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
46 # The upstrem repository we will check for images
47 FDO_UPSTREAM_REPO: libevdev/libevdev
48 LIBEVDEV_SKIP_ROOT_TESTS: 1
50 MESON_BUILDDIR: 'build dir'
55 - _build/test/test-suite.log
56 - $MESON_BUILDDIR/meson-logs/
60 junit: $MESON_BUILDDIR/junit-*.xml
67 - pushd _build > /dev/null
68 - ../autogen.sh --disable-silent-rules $CONFIGURE_FLAGS
71 - if ! [[ -z "$MAKE_ARGS" ]]; then make $MAKE_ARGS; fi
78 - .gitlab-ci/meson-build.sh
81 extends: .fdo.distribution-image@fedora
83 FDO_DISTRIBUTION_TAG: '2020-03-17.0'
84 FDO_DISTRIBUTION_VERSION: '30'
87 extends: .fdo.distribution-image@fedora
89 FDO_DISTRIBUTION_TAG: '2020-03-17.0'
90 FDO_DISTRIBUTION_VERSION: '31'
93 extends: .fdo.distribution-image@ubuntu
95 FDO_DISTRIBUTION_TAG: '2020-03-17.0'
96 FDO_DISTRIBUTION_VERSION: '20.04'
99 extends: .fdo.distribution-image@ubuntu
101 FDO_DISTRIBUTION_TAG: '2020-03-17.0'
102 FDO_DISTRIBUTION_VERSION: '19.10'
105 extends: .fdo.distribution-image@debian
107 FDO_DISTRIBUTION_TAG: '2020-03-17.0'
108 FDO_DISTRIBUTION_VERSION: 'stable'
111 extends: .fdo.distribution-image@debian
113 FDO_DISTRIBUTION_TAG: '2020-03-17.0'
114 FDO_DISTRIBUTION_VERSION: 'sid'
117 extends: .fdo.distribution-image@centos
119 FDO_DISTRIBUTION_TAG: '2020-03-17.0'
120 FDO_DISTRIBUTION_VERSION: '7'
123 extends: .fdo.distribution-image@centos
125 FDO_DISTRIBUTION_TAG: '2020-03-17.0'
126 FDO_DISTRIBUTION_VERSION: '8'
129 extends: .fdo.distribution-image@arch
131 FDO_DISTRIBUTION_TAG: '2020-03-17.0'
132 FDO_DISTRIBUTION_VERSION: 'rolling'
135 extends: .fdo.distribution-image@alpine
137 FDO_DISTRIBUTION_TAG: '2020-03-17.0'
138 FDO_DISTRIBUTION_VERSION: 'latest'
142 #################################################################
146 #################################################################
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
156 - apk add python3 py-pip git
157 - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
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"
165 # Verify that commit messages are as expected, signed-off, etc.
172 - apk add python3 py-pip git
173 - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
175 - ci-fairy check-commits --signed-off-by --junit-xml=results.xml
177 - master@libevdev/libevdev
185 # Verify that the merge request has the allow-collaboration checkbox ticked
192 - apk add python3 py-pip git
193 - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
195 - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
205 FDO_DISTRIBUTION_PACKAGES: 'git gcc gcc-c++ meson automake autoconf libtool make pkgconfig python3 check-devel valgrind binutils doxygen xz clang-analyzer'
209 FDO_DISTRIBUTION_PACKAGES: 'git gcc g++ meson automake autoconf libtool make pkg-config python3 check valgrind binutils doxygen xz-utils'
213 FDO_DISTRIBUTION_PACKAGES: 'git gcc g++ meson automake autoconf libtool make pkg-config python3 check valgrind binutils doxygen xz-utils'
217 FDO_DISTRIBUTION_PACKAGES: 'git gcc gcc-c++ automake autoconf libtool make pkgconfig python3 check-devel valgrind binutils xz'
221 FDO_DISTRIBUTION_PACKAGES: 'git gcc meson automake autoconf libtool make pkgconfig python3 check valgrind binutils doxygen'
225 FDO_DISTRIBUTION_PACKAGES: 'git gcc g++ meson automake autoconf libtool make pkgconfig python3 check-dev valgrind binutils doxygen xz linux-headers'
228 # Pulls in the qemu container from upstream or rebuilds it if missing
229 .fedora:30@qemu-prep:
233 - .fdo.qemu-build@fedora
239 FDO_DISTRIBUTION_TAG: qemu-2020-03-17.0
242 # Always rebuilds the container
243 .fedora:30@qemu-forced-rebuild:
245 - .fedora:30@qemu-prep
251 # Pulls in the qemu container from upstream or rebuilds it if missing
252 .fedora:31@qemu-prep:
256 - .fdo.qemu-build@fedora
262 FDO_DISTRIBUTION_TAG: qemu-2020-03-17.0
265 # Always rebuilds the container
266 .fedora:31@qemu-forced-rebuild:
268 - .fedora:31@qemu-prep
275 # This is the actual job
277 extends: .fedora:31@qemu-prep
279 fedora:31@qemu-forced-rebuild:
280 extends: .fedora:31@qemu-forced-rebuild
283 # Pulls in the container from upstream or rebuilds it if missing
284 fedora:30@container-prep:
288 - .fdo.container-build@fedora
293 # Always rebuilds the container
294 fedora:30@container-forced-rebuild:
296 - fedora:30@container-prep
303 # Pulls in the container from upstream or rebuilds it if missing
304 fedora:31@container-prep:
308 - .fdo.container-build@fedora
313 # Always rebuilds the container
314 fedora:31@container-forced-rebuild:
316 - fedora:31@container-prep
323 # Pulls in the container from upstream or rebuilds it if missing
324 ubuntu:20.04@container-prep:
328 - .fdo.container-build@ubuntu
333 # Always rebuilds the container
334 ubuntu:20.04@container-forced-rebuild:
336 - ubuntu:20.04@container-prep
343 # Pulls in the container from upstream or rebuilds it if missing
344 ubuntu:19.10@container-prep:
348 - .fdo.container-build@ubuntu
353 # Always rebuilds the container
354 ubuntu:19.10@container-forced-rebuild:
356 - ubuntu:19.10@container-prep
363 # Pulls in the container from upstream or rebuilds it if missing
364 debian:stable@container-prep:
368 - .fdo.container-build@debian
373 # Always rebuilds the container
374 debian:stable@container-forced-rebuild:
376 - debian:stable@container-prep
383 # Pulls in the container from upstream or rebuilds it if missing
384 debian:sid@container-prep:
388 - .fdo.container-build@debian
393 # Always rebuilds the container
394 debian:sid@container-forced-rebuild:
396 - debian:sid@container-prep
403 # Pulls in the container from upstream or rebuilds it if missing
404 centos:7@container-prep:
408 - .fdo.container-build@centos
413 # Always rebuilds the container
414 centos:7@container-forced-rebuild:
416 - centos:7@container-prep
423 # Pulls in the container from upstream or rebuilds it if missing
424 centos:8@container-prep:
428 - .fdo.container-build@centos
433 # Always rebuilds the container
434 centos:8@container-forced-rebuild:
436 - centos:8@container-prep
443 # Pulls in the container from upstream or rebuilds it if missing
444 arch:rolling@container-prep:
448 - .fdo.container-build@arch
453 # Always rebuilds the container
454 arch:rolling@container-forced-rebuild:
456 - arch:rolling@container-prep
463 # Pulls in the container from upstream or rebuilds it if missing
464 alpine:latest@container-prep:
468 - .fdo.container-build@alpine
473 # Always rebuilds the container
474 alpine:latest@container-forced-rebuild:
476 - alpine:latest@container-prep
483 #################################################################
485 # container clean stage #
486 # run during the clean stage #
488 #################################################################
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
495 stage: container_clean
498 - apk add python3 py-pip git
499 - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates
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
506 - ci-fairy -v --authfile $AUTHFILE delete-image
507 --repository $FDO_DISTRIBUTION_NAME/$FDO_DISTRIBUTION_VERSION
508 --exclude-tag $FDO_DISTRIBUTION_TAG
515 fedora:30@container-clean:
519 needs: ["fedora:30@container-prep"]
522 fedora:31@container-clean:
526 needs: ["fedora:31@container-prep"]
529 ubuntu:20.04@container-clean:
533 needs: ["ubuntu:20.04@container-prep"]
536 ubuntu:19.10@container-clean:
540 needs: ["ubuntu:19.10@container-prep"]
543 debian:stable@container-clean:
547 needs: ["debian:stable@container-prep"]
550 debian:sid@container-clean:
554 needs: ["debian:sid@container-prep"]
557 centos:7@container-clean:
561 needs: ["centos:7@container-prep"]
564 centos:8@container-clean:
568 needs: ["centos:8@container-prep"]
571 arch:rolling@container-clean:
575 needs: ["arch:rolling@container-prep"]
578 alpine:latest@container-clean:
582 needs: ["alpine:latest@container-prep"]
585 #################################################################
589 #################################################################
591 .autotools-build@template:
597 MAKE_ARGS: "distcheck"
599 .meson-build@template:
608 fedora:30@autotools-build:
611 - .autotools-build@template
613 needs: ['fedora:30@container-prep']
615 fedora:30@meson-build:
618 - .meson-build@template
620 needs: ['fedora:30@container-prep']
623 fedora:31@autotools-build:
626 - .autotools-build@template
628 needs: ['fedora:31@container-prep']
630 fedora:31@meson-build:
633 - .meson-build@template
635 needs: ['fedora:31@container-prep']
638 ubuntu:20.04@autotools-build:
641 - .autotools-build@template
643 needs: ['ubuntu:20.04@container-prep']
645 ubuntu:20.04@meson-build:
648 - .meson-build@template
650 needs: ['ubuntu:20.04@container-prep']
653 ubuntu:19.10@autotools-build:
656 - .autotools-build@template
658 needs: ['ubuntu:19.10@container-prep']
660 ubuntu:19.10@meson-build:
663 - .meson-build@template
665 needs: ['ubuntu:19.10@container-prep']
668 debian:stable@autotools-build:
671 - .autotools-build@template
673 needs: ['debian:stable@container-prep']
675 debian:stable@meson-build:
678 - .meson-build@template
680 needs: ['debian:stable@container-prep']
683 debian:sid@autotools-build:
686 - .autotools-build@template
688 needs: ['debian:sid@container-prep']
690 debian:sid@meson-build:
693 - .meson-build@template
695 needs: ['debian:sid@container-prep']
698 centos:7@autotools-build:
701 - .autotools-build@template
704 MAKE_ARGS: '' # disable distcheck, requires doxygen
705 needs: ['centos:7@container-prep']
709 centos:8@autotools-build:
712 - .autotools-build@template
715 MAKE_ARGS: '' # disable distcheck, requires doxygen
716 needs: ['centos:8@container-prep']
720 arch:rolling@autotools-build:
723 - .autotools-build@template
725 needs: ['arch:rolling@container-prep']
727 arch:rolling@meson-build:
730 - .meson-build@template
732 needs: ['arch:rolling@container-prep']
735 alpine:latest@autotools-build:
738 - .autotools-build@template
740 needs: ['alpine:latest@container-prep']
742 alpine:latest@meson-build:
745 - .meson-build@template
747 needs: ['alpine:latest@container-prep']
750 # Build argument tests
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:
757 - .autotools-build@template
759 needs: ['fedora:31@container-prep']
761 no-valgrind:autotools:
762 extends: .fedora-custom-build@autotools-template
764 - dnf remove -y valgrind
767 extends: .fedora-custom-build@autotools-template
769 - dnf remove -y check check-devel
771 no-doxygen:autotools:
772 extends: .fedora-custom-build@autotools-template
774 - dnf remove -y doxygen
776 MAKE_ARGS: '' # disable distcheck, requires doxygen
778 # doxygen is required for distcheck
779 no-doxygen-check-valgrind:autotools:
780 extends: .fedora-custom-build@autotools-template
782 - dnf remove -y doxygen valgrind check check-devel
784 MAKE_ARGS: '' # disable distcheck, requires doxygen
787 extends: .fedora-custom-build@autotools-template
789 - mv /usr/bin/nm /usr/bin/nm.moved
791 enable-gcov:autotools:
792 extends: .fedora-custom-build@autotools-template
794 CONFIGURE_FLAGS: "--enable-gcov"
796 .fedora-custom-build@meson-template:
799 - .meson-build@template
801 needs: ['fedora:31@container-prep']
804 extends: .fedora-custom-build@meson-template
806 - dnf remove -y valgrind
809 extends: .fedora-custom-build@meson-template
811 - dnf remove -y check check-devel
813 MESON_ARGS: -Dtests=disabled
816 # doxygen is required for dist
818 extends: .fedora-custom-build@meson-template
820 - dnf remove -y doxygen
822 MESON_ARGS: -Ddocumentation=disabled
825 # doxygen is required for dist
826 no-doxygen-check-valgrind:meson:
827 extends: .fedora-custom-build@meson-template
829 - dnf remove -y doxygen valgrind check check-devel
831 MESON_ARGS: -Dtests=disabled -Ddocumentation=disabled
836 extends: .fedora-custom-build@meson-template
838 MESON_ARGS: '-Dcoverity=true'
841 extends: .fedora-custom-build@meson-template
843 NINJA_ARGS: 'scan-build'
847 extends: .fedora-custom-build@meson-template
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
858 - ./autogen.sh --prefix=$PWD/prefix-autotools/
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']
866 #################################################################
870 #################################################################
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 ]];
876 echo tainted kernel ;
884 image: $CI_REGISTRY_IMAGE/$FDO_DISTRIBUTION_NAME/$FDO_DISTRIBUTION_VERSION:qemu-$FDO_DISTRIBUTION_TAG
888 MESON_BUILDDIR: build_dir
890 # start our vm, no args required
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" .
908 - ssh localhost -p 5555 halt || true
912 - if [[ ! -e .success ]] ;
917 name: "qemu-meson-logs-$CI_JOB_NAME"
921 - $MESON_BUILDDIR/meson-logs
924 junit: $MESON_BUILDDIR/junit-*.xml
929 needs: ['fedora:31@qemu-prep']
932 extends: .qemu@fedora:31
935 extends: .qemu@fedora:31
937 MESON_TEST_ARGS: '--setup=valgrind'
944 - export INSTALLDIR="$PWD/_inst"
946 - pushd _build > /dev/null
947 - ../autogen.sh --disable-silent-rules $CONFIGURE_FLAGS
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
959 needs: ['fedora:31@container-prep']
961 autotools-from-tarball:
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
973 - pushd _build > /dev/null
974 - ../autogen.sh --disable-silent-rules --prefix="$INSTALLDIR" $CONFIGURE_FLAGS
981 needs: ['fedora:31@container-prep']