summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-08-15 21:51:42 +0200
committerChristoph Reiter <reiter.christoph@gmail.com>2018-08-16 09:16:39 +0200
commitf3d1dc70f1cb0d18738bb293cc7b1bd3a2731c86 (patch)
tree479ae37475771afd7dc4dc3ac81044dc139a5334
parenta7dec0cc0e3b4bb07555581ed9d0f5b6752c3056 (diff)
downloadpygobject-f3d1dc70f1cb0d18738bb293cc7b1bd3a2731c86.tar.gz
ci: build python 2.7 and 3.7 in debug mode. Fixes #243ci-debug-build
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.
-rw-r--r--.gitlab-ci.yml8
-rw-r--r--.gitlab-ci/Dockerfile6
-rwxr-xr-x.gitlab-ci/run-docker.sh4
-rw-r--r--gi/pygobject-object.c2
-rw-r--r--meson.build1
-rwxr-xr-xsetup.py1
6 files changed, 10 insertions, 12 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 21ce5982..3a25c6a6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-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:
diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile
index cc9cff48..a72c7184 100644
--- a/.gitlab-ci/Dockerfile
+++ b/.gitlab-ci/Dockerfile
@@ -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
diff --git a/.gitlab-ci/run-docker.sh b/.gitlab-ci/run-docker.sh
index f80312da..bcfd7075 100755
--- a/.gitlab-ci/run-docker.sh
+++ b/.gitlab-ci/run-docker.sh
@@ -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
diff --git a/gi/pygobject-object.c b/gi/pygobject-object.c
index 02f2478b..dbf46e1e 100644
--- a/gi/pygobject-object.c
+++ b/gi/pygobject-object.c
@@ -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;
diff --git a/meson.build b/meson.build
index 188f979c..4e1fafff 100644
--- a/meson.build
+++ b/meson.build
@@ -69,7 +69,6 @@ main_c_args = [
'-Wformat-security',
'-Wimplicit-function-declaration',
'-Winit-self',
- '-Winline',
'-Wjump-misses-init',
'-Wlogical-op',
'-Wmissing-declarations',
diff --git a/setup.py b/setup.py
index 3ea5c4ce..38bc2e46 100755
--- a/setup.py
+++ b/setup.py
@@ -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",