Commit f3d1dc70 authored by Christoph Reiter's avatar Christoph Reiter 🐍

ci: build python 2.7 and 3.7 in debug mode. Fixes #243

It contains more strict checks which might be useful for finding potential bugs.

Initialize PyGILState_STATE because gcc can't figure out that state is always
defined in the release case when Py_DEBUG is enabled..

Remove -Winline which is triggerd for pygobject_init() with the debug build.
Not sure what to do when inlining fails, so just remove the warning for now.
parent a7dec0cc
Pipeline #25239 passed with stages
in 5 minutes and 23 seconds
image: registry.gitlab.gnome.org/gnome/pygobject/main:v7
image: registry.gitlab.gnome.org/gnome/pygobject/main:v8
stages:
- build_and_test
......@@ -81,12 +81,12 @@ python3-mingw64:
python2.7:
variables:
PYENV_VERSION: "2.7.15"
PYENV_VERSION: "2.7.15-debug"
<<: *defaults
python3.5:
variables:
PYENV_VERSION: "3.5.5"
PYENV_VERSION: "3.5.6"
<<: *defaults
python3.6:
......@@ -96,7 +96,7 @@ python3.6:
python3.7:
variables:
PYENV_VERSION: "3.7.0"
PYENV_VERSION: "3.7.0-debug"
<<: *defaults
pypy2:
......
......@@ -39,10 +39,10 @@ ENV PYTHON_CONFIGURE_OPTS="--enable-shared"
RUN curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash
RUN pyenv install 2.7.15
RUN pyenv install 3.5.5
RUN pyenv install --debug 2.7.15
RUN pyenv install 3.5.6
RUN pyenv install 3.6.6
RUN pyenv install 3.7.0
RUN pyenv install --debug 3.7.0
RUN pyenv install pypy2.7-6.0.0
RUN pyenv install pypy3.5-6.0.0
......
......@@ -2,10 +2,10 @@
set -e
TAG="registry.gitlab.gnome.org/gnome/pygobject/main:v7"
TAG="registry.gitlab.gnome.org/gnome/pygobject/main:v8"
sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
--file "Dockerfile" .
sudo docker run -e PYENV_VERSION='3.6.6' --rm --security-opt label=disable \
sudo docker run -e PYENV_VERSION='3.7.0-debug' --rm --security-opt label=disable \
--volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
--tty --interactive "${TAG}" bash
......@@ -106,7 +106,7 @@ pygobject_data_free(PyGObjectData *data)
/* This function may be called after the python interpreter has already
* been shut down. If this happens, we cannot do any python calls, so just
* free the memory. */
PyGILState_STATE state;
PyGILState_STATE state = 0;
PyThreadState *_save = NULL;
gboolean state_saved;
GSList *closures, *tmp;
......
......@@ -69,7 +69,6 @@ main_c_args = [
'-Wformat-security',
'-Wimplicit-function-declaration',
'-Winit-self',
'-Winline',
'-Wjump-misses-init',
'-Wlogical-op',
'-Wmissing-declarations',
......
......@@ -893,7 +893,6 @@ def add_ext_compiler_flags(ext, compiler, _cache={}):
"-Wformat-security",
"-Wimplicit-function-declaration",
"-Winit-self",
"-Winline",
"-Wjump-misses-init",
"-Wlogical-op",
"-Wmissing-declarations",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment