[pygobject/ci-gtk4] ci: add a gtk4 job. Fixes #249



commit 85e292c04e479ecfc12f025ffe47daf5fc184f69
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Sat Sep 22 22:03:27 2018 +0200

    ci: add a gtk4 job. Fixes #249
    
    Let it fail for now

 .gitlab-ci.yml                 |  7 +++++++
 .gitlab-ci/Dockerfile.gtk4     | 36 ++++++++++++++++++++++++++++++++++++
 .gitlab-ci/run-docker-gtk4.sh  | 10 ++++++++++
 .gitlab-ci/test-docker-gtk4.sh | 15 +++++++++++++++
 4 files changed, 68 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3a25c6a6..b63296fd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -117,6 +117,13 @@ xenial-i386-py2:
   script:
    - bash -x ./.gitlab-ci/test-docker-old.sh
 
+gtk4:
+  allow_failure: true
+  stage: build_and_test
+  image: registry.gitlab.gnome.org/gnome/pygobject/gtk4:v1
+  script:
+   - bash -x ./.gitlab-ci/test-docker-gtk4.sh
+
 gnome-master:
   allow_failure: true
   stage: build_and_test
diff --git a/.gitlab-ci/Dockerfile.gtk4 b/.gitlab-ci/Dockerfile.gtk4
new file mode 100644
index 00000000..7b650d1b
--- /dev/null
+++ b/.gitlab-ci/Dockerfile.gtk4
@@ -0,0 +1,36 @@
+FROM registry.gitlab.gnome.org/gnome/pygobject/main:v8
+
+USER root
+
+RUN python3 -m pip install meson
+
+ENV DEBIAN_FRONTEND noninteractive
+RUN apt-get update && apt-get install -y \
+    libfribidi-dev \
+    libgraphene-1.0-dev \
+    libgstreamer-plugins-bad1.0-dev \
+    libgtk-3-dev \
+    libwayland-dev \
+    libxml2-dev \
+    wayland-protocols \
+    && rm -rf /var/lib/apt/lists/*
+
+RUN git clone https://gitlab.freedesktop.org/wayland/wayland.git \
+    && cd wayland \
+    && git checkout 1.16.0 \
+    && ./autogen.sh --disable-documentation \
+    && make -j8 && make install \
+    && cd .. \
+    && rm -Rf wayland
+
+RUN git clone https://gitlab.gnome.org/GNOME/gtk.git \
+    && cd gtk \
+    && git checkout 273189fc \
+    &&  meson -Dprefix=/usr -Dbuild-tests=false -Ddemos=false -Dbuild-examples=false -Dprint-backends=none 
_build \
+    && ninja -C _build \
+    && ninja -C _build install \
+    && cd .. \
+    && rm -Rf gtk
+
+USER user
+ENV PYENV_VERSION 3.7.0-debug
diff --git a/.gitlab-ci/run-docker-gtk4.sh b/.gitlab-ci/run-docker-gtk4.sh
new file mode 100755
index 00000000..f6c979d0
--- /dev/null
+++ b/.gitlab-ci/run-docker-gtk4.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+set -e
+
+TAG="registry.gitlab.gnome.org/gnome/pygobject/gtk4:v1"
+
+sudo docker build --tag "${TAG}" --file "Dockerfile.gtk4" .
+sudo docker run --rm --security-opt label=disable \
+    --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
+    --tty --interactive "${TAG}" bash
diff --git a/.gitlab-ci/test-docker-gtk4.sh b/.gitlab-ci/test-docker-gtk4.sh
new file mode 100755
index 00000000..e36c715d
--- /dev/null
+++ b/.gitlab-ci/test-docker-gtk4.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+set -e
+
+# ccache setup
+mkdir -p _ccache
+export CCACHE_BASEDIR="$(pwd)"
+export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
+
+# test
+python -m pip install git+https://github.com/pygobject/pycairo.git
+python -m pip install pytest pytest-faulthandler
+g-ir-inspect Gtk --version=4.0 --print-typelibs
+export TEST_GTK_VERSION=4.0
+xvfb-run -a python setup.py test


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