[gnome-shell/wip/fmuellner/ci-test: 2/3] ci: Add build stage



commit b317c27686115eaec74f18c77977c167bf1868a8
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Feb 12 17:53:42 2019 +0100

    ci: Add build stage
    
    So far we are only performing a basic syntax check on javascript
    sources; it's time to test the C code as well. As mutter is tightly
    coupled, we bite the bullet and build it as well, either using a
    matching branch (if it exists), or current master.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/408

 .gitlab-ci.yml | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 595f9b5a0..2be3bce8f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,6 @@
 stages:
  - source_check
+ - build
 
 variables:
     JS_LOG: "js-report.txt"
@@ -19,3 +20,27 @@ js_check:
         paths:
             - ${JS_LOG}
         when: on_failure
+
+build:
+    image: registry.gitlab.gnome.org/gnome/mutter/master:v1
+    stage: build
+    before_script:
+        # non-mutter build dependencies
+        - dnf builddep -y gnome-shell
+        - dnf remove -y mutter
+        # check out mutter ...
+        - git clone https://gitlab.gnome.org/GNOME/mutter.git
+        - cd mutter
+        # ... either at the branch matching the MR, or master ...
+        - MUTTER_BRANCH=origin/${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-master}
+        - MUTTER_BRANCH=$(git branch -r -l $MUTTER_BRANCH)
+        - git checkout ${MUTTER_BRANCH:-origin/master}
+        # ... and build it
+        - meson . build --prefix=/usr -Dtests=false
+        - ninja -C build
+        - ninja -C build install
+        - cd ..
+    script:
+        - meson . build -Dbuiltype=debugoptimized
+        - ninja -C build
+        - ninja -C build install


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