[gnome-builder] gitlabci: build from pre-existing checkout



commit 9fd3c1c63af7f95f30354dae09fcd99ba78ba8d5
Author: Jordan Petridis <jordanpetridis protonmail com>
Date:   Sun Mar 18 18:11:26 2018 +0200

    gitlabci: build from pre-existing checkout
    
    Adapted patch from nautilus d36fa3fdaba2c249cff8ff9b0861f100d8b920b8
    This should make the CI job to build a flatpak based on the branch it was
    run from instead of always building GNOME/gnome-builder/master.

 .gitlab-ci.yml | 28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d17472a19..fb14ba59e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,15 +4,30 @@ stages:
 flatpak:master:
     image: registry.gitlab.com/alatiera/gnome-nightly-oci/gnome-master:latest
     stage: test
+
+    variables:
+        GIT_SUBMODULE_STRATEGY: normal
+
     script:
-    # This should be removed once the base image works with git submodules
-    - dnf install -y git
+        # This should be removed once the base image works with git submodules
+        - dnf install -y git
+
+        # Build the flatpak repo
+        - flatpak-builder --stop-at=gnome-builder app build-aux/flatpak/org.gnome.Builder.json
+        - flatpak-builder --run app build-aux/flatpak/org.gnome.Builder.json meson --prefix=/app 
--libdir=/app/lib _build
+        - flatpak-builder --run app build-aux/flatpak/org.gnome.Builder.json ninja -C _build install
+        - flatpak-builder --finish-only app build-aux/flatpak/org.gnome.Builder.json
+        - flatpak build-export repo app
+
+        # Make a flatpak for people to test
+        - flatpak build-bundle repo gnome-builder-dev.flatpak org.gnome.Builder
+
+        # Run tests inside the Flatpak env
+        - flatpak-builder --run app build-aux/flatpak/org.gnome.Builder.json ninja -C _build test
 
-    - flatpak-builder --force-clean --repo=repo app build-aux/flatpak/org.gnome.Builder.json
-    - flatpak build-bundle repo builder-dev.flatpak org.gnome.Builder
     artifacts:
         paths:
-          - builder-dev.flatpak
+            - gnome-builder-dev.flatpak
         expire_in: 2 days
 
     cache:
@@ -21,4 +36,5 @@ flatpak:master:
         # ^ Keep diffrerent caches for each branch
         key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
         paths:
-          - .flatpak-builder/cache/
\ No newline at end of file
+            # Cache .flatpak-builder
+            - .flatpak-builder/cache/


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