From 2dbf8f4ea4992ca33c272786f860d7fc291ba89b Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Wed, 11 Jul 2018 18:49:27 +0200 Subject: meson: Add a "python" option to make the python to build against configurable This allows us to build with Python 2 and run tests with it. This requires the new "python" meson module which was added in 0.46.0 so bump the required meson version (glib needs a newer one anyway). Also fixes a small test error under Python 2. --- .gitlab-ci.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 74052943..457b8921 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,14 +5,33 @@ cache: paths: - _ccache/ -fedora-x86_64: +fedora-x86_64-python3: stage: build image: registry.gitlab.gnome.org/gnome/gobject-introspection:v1 variables: CCACHE_BASEDIR: "${CI_PROJECT_DIR}" CCACHE_DIR: "${CI_PROJECT_DIR}/_ccache" script: - - meson --prefix /usr --libdir /usr/lib64 --buildtype debug -Dcairo=true _build . + - meson --prefix /usr --libdir /usr/lib64 --buildtype debug -Dcairo=true -Dpython=python3 _build . + - cd _build + - ninja + - meson test --print-errorlogs --suite=gobject-introspection --no-suite=glib + except: + - tags + artifacts: + when: on_failure + name: "gi-_${CI_COMMIT_REF_NAME}" + paths: + - "${CI_PROJECT_DIR}/_build/meson-logs" + +fedora-x86_64-python2: + stage: build + image: registry.gitlab.gnome.org/gnome/gobject-introspection:v1 + variables: + CCACHE_BASEDIR: "${CI_PROJECT_DIR}" + CCACHE_DIR: "${CI_PROJECT_DIR}/_ccache" + script: + - meson --prefix /usr --libdir /usr/lib64 --buildtype debug -Dcairo=true -Dpython=python2 _build . - cd _build - ninja - meson test --print-errorlogs --suite=gobject-introspection --no-suite=glib -- cgit v1.2.1