.gitlab-ci.yml 2.9 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
  extends: .libfprint_common_variables
11 12 13
  FDO_DISTRIBUTION_TAG: latest
  FDO_DISTRIBUTION_VERSION: rawhide
  FEDORA_IMAGE: "$CI_REGISTRY/libfprint/$CI_PROJECT_NAME/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG"
14 15 16 17 18 19 20
  DEPENDENCIES: dbus-glib-devel
                gcc
                gcovr
                gettext
                git
                glibc-devel
                gtk-doc
21
                libasan
22 23 24 25 26 27 28
                libfprint-devel
                meson
                pam-devel
                polkit-devel
                python3-dbusmock
                python3-libpamtest
                systemd-devel
29 30

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

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

37
.install_libfprint_dev:
38
  before_script:
39 40
    # Make sure we don't build or link against the system libfprint
    - dnf remove -y libfprint-devel
41 42 43 44 45 46 47 48 49
    - 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

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

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

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

87 88 89 90 91 92 93 94 95 96 97 98 99 100
test_dev_with_sanitizer:
  extends:
    - .fprintd_build_preconditions
    - .install_libfprint_dev
  stage: test
  script:
    - meson _build -Db_sanitize=address
    - meson test -C _build --verbose --no-stdsplit --timeout-multiplier 5
  artifacts:
    name: meson-logs
    when: on_failure
    paths:
      - _build/meson-logs

101
# CONTAINERS creation stage
102
container_fedora_build:
103
  extends: .fdo.container-build@fedora
104 105 106 107 108 109
  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
110
    FDO_DISTRIBUTION_PACKAGES:
111 112
      $DEPENDENCIES
      $LIBFPRINT_DEPENDENCIES