[gvfs/wip/oholy/gnome-build-meta] ci: Add gnome-build-meta job



commit 0be1eca6d1cd8b05f1ec480c38236217970dda1d
Author: Ondrej Holy <oholy redhat com>
Date:   Mon Jan 14 16:24:01 2019 +0100

    ci: Add gnome-build-meta job

 .gitlab-ci.yml              | 10 ++++++++++
 .gitlab-ci/Dockerfile       | 17 ++++++++++++++++-
 .gitlab-ci/buildstream.conf |  5 +++++
 3 files changed, 31 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4d2c724d..7377eca7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,6 +8,13 @@ fedora:
         - meson build --werror
         - ninja -C build
 
+gnome-build-meta:
+    stage: build
+    image: "$CI_REGISTRY_IMAGE/$NAME"
+    script:
+        - bst --config /buildstream.conf --directory /gnome-build-meta workspace open --no-checkout 
sdk/gvfs.bst .
+        - bst --config /buildstream.conf --directory /gnome-build-meta build sdk/gvfs.bst
+
 update-image:
     stage: build
     image: docker:latest
@@ -15,6 +22,9 @@ update-image:
         - docker:dind
     script:
         - docker build --tag "$CI_REGISTRY_IMAGE/$NAME" .gitlab-ci/
+        # The following can't be run from Dockerfile as it needs --privileged.
+        - docker run --privileged --name $NAME "$CI_REGISTRY_IMAGE/$NAME" bash -c "bst --config 
/buildstream.conf --directory /gnome-build-meta build --track-all sdk/gvfs.bst"
+        - docker commit $NAME "$CI_REGISTRY_IMAGE:$NAME"
         - docker tag "$CI_REGISTRY_IMAGE/$NAME" "$CI_REGISTRY_IMAGE/$NAME:v$CI_JOB_ID"
         - docker login ${CI_REGISTRY} -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD}
         - docker push "$CI_REGISTRY_IMAGE/$NAME"
diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile
index 73d876cf..dadf8840 100644
--- a/.gitlab-ci/Dockerfile
+++ b/.gitlab-ci/Dockerfile
@@ -11,4 +11,19 @@ RUN dnf install -y --best elfutils-libelf-devel gamin-devel gcc gcc-c++ gdbm get
  && ninja -C _build \
  && ninja -C _build install \
  && cd .. \
- && rm -rf glib
\ No newline at end of file
+ && rm -rf glib
+
+# https://gitlab.com/BuildStream/buildstream-docker-images/blob/master/buildstream-fedora/prepare.sh
+# https://gitlab.gnome.org/GNOME/gnome-build-meta/blob/master/.gitlab-ci.yml
+RUN dnf install -y python3 fuse bubblewrap python3-pip python-setuptools python3-devel gcc-c++ bzr git lzip 
patch ostree python3-gobject quilt make findutils \
+ && dnf clean all \
+ && pip3 install arpy \
+ && git clone https://gitlab.com/BuildStream/buildstream.git \
+ && git -C buildstream/ checkout 10abe77fe8d77385d86f225b503d9185f4ef7f3a \
+ && pip3 install buildstream/ \
+ && git clone https://gitlab.com/BuildStream/bst-external.git \
+ && git -C bst-external/ checkout 0.8.0-0-g762ea216b751bf89ac15350e1cb98542963bbf33 \
+ && pip3 install bst-external/ \
+ && git clone --depth 1 https://gitlab.gnome.org/GNOME/gnome-build-meta.git
+
+COPY buildstream.conf /
diff --git a/.gitlab-ci/buildstream.conf b/.gitlab-ci/buildstream.conf
new file mode 100644
index 00000000..b21cb59a
--- /dev/null
+++ b/.gitlab-ci/buildstream.conf
@@ -0,0 +1,5 @@
+# This prevents purging of the buildstream cache.
+sourcedir: /cache/buildstream/sources
+builddir: /cache/buildstream/build
+artifactdir: /cache/buildstream/artifacts
+logdir: /cache/buildstream/logs


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