.gitlab-ci.yml 2.43 KB
Newer Older
Bastien Nocera's avatar
Bastien Nocera committed
1 2 3
image: fedora:rawhide
stages:
  - build
4
  - test
Bastien Nocera's avatar
Bastien Nocera committed
5 6 7

variables:
  DEPENDENCIES: libusb1-devel glib2-devel nss-devel pixman-devel systemd meson gtk-doc
8 9
                gcc gcc-c++ glibc-devel libX11-devel libXv-devel gtk3-devel flatpak-builder
  BUNDLE: "org.freedesktop.libfprint.Demo.flatpak"
Bastien Nocera's avatar
Bastien Nocera committed
10
  LAST_ABI_BREAK: "056ea541ddc97f5806cffbd99a12dc87e4da3546"
Bastien Nocera's avatar
Bastien Nocera committed
11

12
.build_one_driver_template: &build_one_driver
Bastien Nocera's avatar
Bastien Nocera committed
13
  script:
14
    - dnf update -y --nogpgcheck && dnf install -y --nogpgcheck $DEPENDENCIES
15 16 17
    # Build with a driver that doesn't need imaging, or nss
    - meson -Ddrivers=elan . _build
    - ninja -C _build
18
    - rm -rf _build/
19 20 21 22

.build_template: &build
  script:
    - dnf update -y --nogpgcheck && dnf install -y --nogpgcheck $DEPENDENCIES
23 24
    # And build with everything
    - meson -Ddrivers=all . _build
Bastien Nocera's avatar
Bastien Nocera committed
25 26 27
    - ninja -C _build
    - ninja -C _build install

Bastien Nocera's avatar
Bastien Nocera committed
28 29 30 31 32
.build_template: &check_abi
  script:
    - dnf update -y --nogpgcheck && dnf install -y --nogpgcheck $DEPENDENCIES doxygen libabigail git
    - ./.ci/check-abi ${LAST_ABI_BREAK} $(git rev-parse HEAD)

33 34 35 36
build:
  stage: build
  <<: *build_one_driver
  <<: *build
Bastien Nocera's avatar
Bastien Nocera committed
37
  <<: *check_abi
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61

.flatpak_script_template: &flatpak_script
    script:
        - flatpak-builder --stop-at=${FLATPAK_MODULE} app ${MANIFEST_PATH}
        # Make sure to keep this in sync with the Flatpak manifest, all arguments
        # are passed except the config-args because we build it ourselves
        - flatpak build app meson --prefix=/app --libdir=lib ${MESON_ARGS} _build
        - flatpak build app ninja -C _build install
        - flatpak build app rm -rf /app/include/ /app/lib/pkgconfig/
        - flatpak-builder --finish-only --repo=repo app ${MANIFEST_PATH}
        # Generate a Flatpak bundle
        - flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${DBUS_ID}

.flatpak_artifacts_template: &flatpak_artifacts
    artifacts:
        paths:
            - ${BUNDLE}
        when: always
        expire_in: 30 days

.flatpak_template: &flatpak
    <<: *flatpak_script
    <<: *flatpak_artifacts

62
flatpak master:
63 64 65 66 67 68 69 70 71
    image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master
    stage: test
    variables:
        MANIFEST_PATH: "demo/org.freedesktop.libfprint.Demo.json"
        # From demo/org.freedesktop.libfprint.Demo.json
        MESON_ARGS: "-Dudev_rules=false -Dx11-examples=false -Dgtk-examples=true"
        FLATPAK_MODULE: "libfprint"
        DBUS_ID: "org.freedesktop.libfprint.Demo"
    <<: *flatpak