[pygobject] gitlab-ci: Add a 32bit Ubuntu 16.04 image. Fixes #175
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] gitlab-ci: Add a 32bit Ubuntu 16.04 image. Fixes #175
- Date: Tue, 13 Mar 2018 13:38:58 +0000 (UTC)
commit cfb3a488f02e50be1fd376d2ea990b00301b1839
Author: Christoph Reiter <reiter christoph gmail com>
Date: Tue Mar 13 12:56:04 2018 +0100
gitlab-ci: Add a 32bit Ubuntu 16.04 image. Fixes #175
To make sure everything works with older libraries.
.gitlab-ci.yml | 13 ++++++++-----
.gitlab-ci/Dockerfile.old | 36 ++++++++++++++++++++++++++++++++++++
.gitlab-ci/run-docker-old.sh | 11 +++++++++++
.gitlab-ci/test-docker-old.sh | 17 +++++++++++++++++
MANIFEST.in | 2 +-
tests/test_overrides_gtk.py | 9 +++++++++
6 files changed, 82 insertions(+), 6 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ce06132c..e4468607 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,8 +1,3 @@
-services:
- - docker
-
-image: lazka/pygobject:pyenv
-
stages:
- build_and_test
- coverage
@@ -13,6 +8,7 @@ cache:
.defaults: &defaults
stage: build_and_test
+ image: lazka/pygobject:pyenv
artifacts:
paths:
- coverage/
@@ -32,6 +28,7 @@ cache:
coverage:
stage: coverage
+ image: lazka/pygobject:pyenv
artifacts:
paths:
- coverage/
@@ -92,3 +89,9 @@ python3.7:
variables:
PYENV_VERSION: "3.7.0b2"
<<: *defaults
+
+xenial-i386-py2:
+ stage: build_and_test
+ image: lazka/pygobject:pyenv-old
+ script:
+ - bash -x ./.gitlab-ci/test-docker-old.sh
diff --git a/.gitlab-ci/Dockerfile.old b/.gitlab-ci/Dockerfile.old
new file mode 100644
index 00000000..fa135de7
--- /dev/null
+++ b/.gitlab-ci/Dockerfile.old
@@ -0,0 +1,36 @@
+FROM i386/ubuntu:xenial
+
+RUN apt-get update && apt-get install -y \
+ autoconf-archive \
+ build-essential \
+ ccache \
+ curl \
+ dbus \
+ gir1.2-gtk-3.0 \
+ git \
+ gobject-introspection \
+ lcov \
+ libcairo2-dev \
+ libffi-dev \
+ libgirepository1.0-dev \
+ libglib2.0-dev \
+ libgtk-3-0 \
+ libtool \
+ locales \
+ python-dev \
+ python-virtualenv \
+ xauth \
+ xvfb \
+ && rm -rf /var/lib/apt/lists/*
+
+ARG HOST_USER_ID=5555
+ENV HOST_USER_ID ${HOST_USER_ID}
+RUN useradd -u $HOST_USER_ID -ms /bin/bash user
+
+USER user
+WORKDIR /home/user
+
+ENV LANG C.UTF-8
+ENV CI true
+
+ENV PATH="/usr/lib/ccache:${PATH}"
diff --git a/.gitlab-ci/run-docker-old.sh b/.gitlab-ci/run-docker-old.sh
new file mode 100755
index 00000000..bdd6e54d
--- /dev/null
+++ b/.gitlab-ci/run-docker-old.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -e
+
+TAG="lazka/pygobject:pyenv-old"
+
+sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
+ --file "Dockerfile.old" .
+sudo docker run --rm \
+ --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
+ --tty --interactive "${TAG}" bash
diff --git a/.gitlab-ci/test-docker-old.sh b/.gitlab-ci/test-docker-old.sh
new file mode 100755
index 00000000..74c81c77
--- /dev/null
+++ b/.gitlab-ci/test-docker-old.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+set -e
+
+python --version
+virtualenv --python=python _venv
+source _venv/bin/activate
+
+# 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
+xvfb-run -a python setup.py test
diff --git a/MANIFEST.in b/MANIFEST.in
index bddf19a6..e69e3144 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -16,4 +16,4 @@ recursive-include gi *.am *.h
recursive-include pygtkcompat *.am
recursive-include tests *.py *.c *.h *.xml *.supp *.am
recursive-include docs *.rst *.svg LICENSE *.ico *.png *.css *.py *.dia Makefile
-recursive-include .gitlab-ci *.sh *.rst *.py Dockerfile
+recursive-include .gitlab-ci *.sh *.rst *.py Dockerfile*
diff --git a/tests/test_overrides_gtk.py b/tests/test_overrides_gtk.py
index aa55564a..fbfe9cfb 100644
--- a/tests/test_overrides_gtk.py
+++ b/tests/test_overrides_gtk.py
@@ -28,6 +28,14 @@ except ImportError:
Gdk = None
+def gtkver():
+ if Gtk is None:
+ return (0, 0, 0)
+ return (Gtk.get_major_version(),
+ Gtk.get_minor_version(),
+ Gtk.get_micro_version())
+
+
@contextlib.contextmanager
def realized(widget):
"""Makes sure the widget is realized.
@@ -1988,6 +1996,7 @@ class TestTextBuffer(unittest.TestCase):
self.assertEqual(buffer.get_property('text'),
'first line\nsecond line\n')
+ @unittest.skipIf(gtkver() < (3, 20, 0), "broken with older gtk")
def test_backward_find_char(self):
buffer = Gtk.TextBuffer()
buffer.set_text('abc')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]