[gnome-shell/wip/fmuellner/more-ci: 1/2] ci: Add build stage



commit fa96110908b5d7ffa22125b72ef80b8ce6ee065f
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 07c9144af..f1f361cb7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,6 @@
 stages:
  - source_check
+ - build
 
 variables:
     JS_LOG: "js-report.txt"
@@ -16,3 +17,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]