From ad9c8a8ee3030de98070ccfe37838c062b3956f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Fri, 14 Jan 2022 16:32:09 +0100 Subject: [PATCH] flatpak: add a builder to build nightly flatpak --- .gitlab-ci.yml | 39 +++++++++---------- ...top.dabrain34.GstPipelineStudio.Devel.json | 36 +++++++++++++++++ 2 files changed, 54 insertions(+), 21 deletions(-) create mode 100644 build-aux/org.freedesktop.dabrain34.GstPipelineStudio.Devel.json diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5b73c37..35f5441 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -89,30 +89,27 @@ clippy: - cargo clippy --color=always --all-targets -- -D warnings flatpak: - image: $GNOME_RUNTIME_IMAGE - stage: "test" + image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:40" + stage: test only: - flatpak - timeout: "120min" variables: - MANIFEST_PATH: "build-aux/org.karapulse.KarapulseDevel.json" - APP_ID: "org.karapulse.KarapulseDevel" - BUNDLE: "karapulse-nightly.flatpak" - + BUNDLE: "gst-pipeline-studio-nightly.flatpak" + MANIFEST_PATH: "build-aux/org.freedesktop.dabrain34.GstPipelineStudio.Devel.json" + FLATPAK_MODULE: "gst-pipeline-studio" + APP_ID: "org.freedesktop.dabrain34.GstPipelineStudio.Devel" + RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo" script: - - flatpak-builder app ${MANIFEST_PATH} - - flatpak build-export repo app - - flatpak build-bundle repo ${BUNDLE} ${APP_ID} - + - > + xvfb-run -a -s "-screen 0 1024x768x24" + flatpak-builder --keep-build-dirs --user --disable-rofiles-fuse flatpak_app --repo=repo ${BRANCH:+--default-branch=$BRANCH} ${MANIFEST_PATH} + - flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH} artifacts: + name: "Flatpak artifacts" + expose_as: "Get Flatpak bundle here" + when: "always" paths: - - $BUNDLE - expire_in: 1 days - - cache: - key: "flatpak" - paths: - - .flatpak-builder/downloads/ - - .flatpak-builder/git/ - - target/ - - target_test/ + - "${BUNDLE}" + - ".flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/meson-logs/meson-log.txt" + - ".flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/meson-logs/testlog.txt" + expire_in: 14 days diff --git a/build-aux/org.freedesktop.dabrain34.GstPipelineStudio.Devel.json b/build-aux/org.freedesktop.dabrain34.GstPipelineStudio.Devel.json new file mode 100644 index 0000000..e84d9b4 --- /dev/null +++ b/build-aux/org.freedesktop.dabrain34.GstPipelineStudio.Devel.json @@ -0,0 +1,36 @@ +{ + "app-id": "org.freedesktop.dabrain34.GstPipelineStudio.Devel", + "runtime": "org.gnome.Platform", + "runtime-version": "40", + "sdk": "org.gnome.Sdk", + "sdk-extensions": ["org.freedesktop.Sdk.Extension.rust-stable"], + "command": "gtk-rust-template", + "finish-args": [ + "--socket=fallback-x11", + "--socket=wayland", + "--device=dri", + "--talk-name=org.a11y.Bus", + "--env=RUST_LOG=gtk-rust-template=debug", + "--env=G_MESSAGES_DEBUG=none", + "--env=RUST_BACKTRACE=1" + ], + "build-options": { + "append-path": "/usr/lib/sdk/rust-stable/bin", + "build-args": ["--share=network"], + "test-args": ["--socket=x11", "--share=network"] + }, + "modules": [ + { + "name": "gst_pipeline_studio", + "buildsystem": "meson", + "run-tests": true, + "config-opts": ["-Dprofile=development"], + "sources": [ + { + "type": "dir", + "path": "../" + } + ] + } + ] +}