.gitlab-ci.yml 2.5 KB
Newer Older
1
2
3
4
include:
  - project: 'libfprint/libfprint'
    ref: master
    file: '/.gitlab-ci/libfprint-templates.yaml'
5
6
7
  - project: 'wayland/ci-templates'
    ref: master
    file: '/templates/fedora.yml'
8

Bastien Nocera's avatar
Bastien Nocera committed
9
variables:
10
11
12
13
  extends: .libfprint_common_variables
  FEDORA_TAG: rawhide
  FEDORA_VERSION: rawhide
  FEDORA_IMAGE: "$CI_REGISTRY/libfprint/$CI_PROJECT_NAME/fedora/$FEDORA_VERSION:$FEDORA_TAG"
14
15
16
17
18
19
20
21
22
23
24
25
26
27
  DEPENDENCIES: dbus-glib-devel
                gcc
                gcovr
                gettext
                git
                glibc-devel
                gtk-doc
                libfprint-devel
                meson
                pam-devel
                polkit-devel
                python3-dbusmock
                python3-libpamtest
                systemd-devel
28
29

image: "$FEDORA_IMAGE"
Bastien Nocera's avatar
Bastien Nocera committed
30

31
32
33
34
35
.fprintd_build_preconditions:
  except:
    variables:
      - $FPRINT_CRON_TASK == "BUILD_CI_IMAGES"

36
.install_libfprint_dev:
37
  before_script:
38
39
    # Make sure we don't build or link against the system libfprint
    - dnf remove -y libfprint-devel
40
41
42
43
44
45
46
47
48
    - git clone https://gitlab.freedesktop.org/libfprint/libfprint.git
    - cd libfprint
    - meson . _build --prefix=/usr -Ddrivers=virtual_image -Ddoc=false
    - ninja -C _build
    - ninja -C _build install
    - cd ..
    # So we don't get error about this libfprint file
    - echo "libfprint/demo/gtk-libfprint-test.ui" >> po/POTFILES.skip

49
build_stable:
50
  extends: .fprintd_build_preconditions
51
52
53
54
55
  script:
    - meson _build
    - ninja -C _build -v
    - ninja -C _build -v install

56
build_dev:
57
58
59
  extends:
    - .fprintd_build_preconditions
    - .install_libfprint_dev
60
  script:
Bastien Nocera's avatar
Bastien Nocera committed
61
    - meson _build --werror -Dgtk_doc=true
62
63
64
65
66
67
68
69
    - ninja -C _build -v
    - ninja -C _build -v install
  artifacts:
    name: log
    when: on_failure
    paths:
      - _build/meson-logs/*.txt

70
test_dev:
71
72
73
  extends:
    - .fprintd_build_preconditions
    - .install_libfprint_dev
74
75
  stage: test
  script:
76
    - meson _build -Db_coverage=true
77
    - meson test -C _build --verbose --no-stdsplit --timeout-multiplier 3
78
    - ninja -C _build coverage
79
    - cat _build/meson-logs/coverage.txt
80
  artifacts:
81
    name: log-and-coverage
82
83
    when: always
    paths:
84
      - _build/meson-logs
85
86
87
88
89
90
91
92
93
94
95
96
97

# CONTAINERS creation stage
container_fedora_build:
  extends: .fedora@container-build
  only:
    variables:
      - $FPRINT_CRON_TASK == "BUILD_CI_IMAGES"
  variables:
    GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
    # a list of packages to install
    FEDORA_RPMS:
      $DEPENDENCIES
      $LIBFPRINT_DEPENDENCIES