[gnome-music/wip/jfelder/flatpak-build: 4/4] ci: Build flatpak



commit 5183825b656bfef89391ebb6d9e2d373b0fc97d8
Author: Jean Felder <jfelder src gnome org>
Date:   Mon May 7 17:21:05 2018 +0200

    ci: Build flatpak
    
    Have Flatpak build as part of the CI.
    Create Flatpak bundles for every commit and merge request.
    
    See: #158

 .gitlab-ci.yml | 36 +++++++++++++++++++++++++-----------
 1 file changed, 25 insertions(+), 11 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f57b7c18..7ea4f5be 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,20 +1,34 @@
-image: fedora:latest
+image: registry.gitlab.gnome.org/gnome/gnome-nightly-oci/nightly:master
 stages:
   - check
-  - build
+  - build-flatpak
 
 variables:
-  DEPENDENCIES: gettext-devel git pygobject3 pygobject3-devel python3-gobject
-                python3-cairo-devel gtk3-devel gobject-introspection-devel
-                tracker-devel libmediaart-devel grilo-devel libsoup-devel
-                gnome-online-accounts-devel meson ninja-build
+  BUNDLE: "gnome-music-dev.flatpak"
+  FLATPAK_MODULE: "gnome-music"
+  GIT_SUBMODULE_STRATEGY: normal
+  MANIFEST_PATH: "org.gnome.Music.json"
+  RUNTIME_REPO: "https://sdk.gnome.org/gnome-nightly.flatpakrepo";
 
-.build:
-  stage: build
+flatpak:
+  stage: build-flatpak
   script:
-    - dnf install -y $DEPENDENCIES
-    - meson builddir
-    - ninja -C builddir
+    - flatpak-builder --stop-at=${FLATPAK_MODULE} app ${MANIFEST_PATH}
+    - flatpak build app meson --prefix=/app _build
+    - flatpak build app ninja -C _build install
+    - flatpak-builder --finish-only --repo=repo app ${MANIFEST_PATH}
+    - flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} org.gnome.Music
+  artifacts:
+    paths:
+      - ${BUNDLE}
+      - _build/meson-logs/meson-log.txt
+    expire_in: 2 days
+  cache:
+    paths:
+      - .flatpak-builder/cache
+  environment:
+    name: review/$CI_COMMIT_REF_NAME
+    url: https://gitlab.gnome.org/$CI_PROJECT_PATH/-/jobs/$CI_JOB_ID/artifacts/raw/${BUNDLE}
 
 flake8:
   stage: check


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]