ci: Build flatpak using GNOME runner and template

This commit is contained in:
Benjamin Berg 2020-09-02 16:27:53 +02:00
parent 5b087ed848
commit 30e1a68344

View file

@ -3,6 +3,7 @@ include:
- project: 'wayland/ci-templates' - project: 'wayland/ci-templates'
ref: master ref: master
file: '/templates/fedora.yml' file: '/templates/fedora.yml'
- remote: 'https://gitlab.gnome.org/GNOME/citemplates/-/raw/master/flatpak/flatpak_ci_initiative.yml'
variables: variables:
extends: .libfprint_common_variables extends: .libfprint_common_variables
@ -108,56 +109,34 @@ test_indent:
- git diff - git diff
- "! git status -s | grep -q ." - "! git status -s | grep -q ."
.flatpak_script_template: &flatpak_script .flatpak-libfprint:
script: stage: flatpak
- flatpak-builder --stop-at=${FLATPAK_MODULE} app ${MANIFEST_PATH} extends: .flatpak
# Make sure to keep this in sync with the Flatpak manifest, all arguments image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.36
# are passed except the config-args because we build it ourselves variables:
- flatpak build app meson --prefix=/app --libdir=lib ${MESON_ARGS} _build MANIFEST_PATH: "demo/org.freedesktop.libfprint.Demo.json"
- flatpak build app ninja -C _build install FLATPAK_MODULE: "libfprint"
- flatpak build app rm -rf /app/include/ /app/lib/pkgconfig/ APP_ID: "org.freedesktop.libfprint.Demo"
- 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
.flatpak_master_template: &flatpak_master
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.36
stage: flatpak
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
flatpak-auto master: flatpak-auto master:
<<: *flatpak_master extends: .flatpak-libfprint
when: always when: always
only: only:
- tags
- master
except:
variables:
- $CI_PIPELINE_SOURCE == "schedule"
flatpak-manual:
extends: .flatpak-libfprint
when: manual
except:
refs:
- tags - tags
- master - master
variables:
flatpak-manual master: - $CI_PIPELINE_SOURCE == "schedule"
<<: *flatpak_master
when: manual
except:
refs:
- tags
- master
variables:
- $CI_PIPELINE_SOURCE == "schedule"
# CONTAINERS creation stage # CONTAINERS creation stage
container_fedora_build: container_fedora_build: