.gitlab-ci.yml 2.16 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

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

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

27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
build:
  stage: build
  <<: *build_one_driver
  <<: *build

.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

55
.flatpak master:
56 57 58 59 60 61 62 63 64
    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