From 47a20304bde852659a0de160c2841a722209dc2b Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 13 Dec 2019 13:54:28 -0500 Subject: [PATCH] ci: Update Meson to 0.52.1 in fedora docker This is required to be able to build the doc. The debian docker is still pinned to 0.49.2 which ensure we can build with both versions of meson. Meson 0.52.0 warns about adding -Wall flag manually, we can remove that because warning_level=1 (the default) option already implies it. --- .gitlab-ci.yml | 23 +++++++++++++++++++---- .gitlab-ci/fedora.Dockerfile | 3 ++- meson.build | 1 - 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b0e6c93bd..38d629b17 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,13 +10,14 @@ cache: - _ccache/ variables: - FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v6" + FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v7" DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v6" ANDROID_IMAGE: "registry.gitlab.gnome.org/gnome/glib/android-ndk:v2" MINGW_IMAGE: "registry.gitlab.gnome.org/gnome/glib/mingw:v2" MESON_TEST_TIMEOUT_MULTIPLIER: 2 G_MESSAGES_DEBUG: all - MESON_COMMON_OPTIONS: "--buildtype debug --fatal-meson-warnings --wrap-mode=nodownload" + MESON_COMMON_OPTIONS_NO_WARNING: "--buildtype debug --wrap-mode=nodownload" + MESON_COMMON_OPTIONS: "${MESON_COMMON_OPTIONS_NO_WARNING} --fatal-meson-warnings" .only-default: only: @@ -44,7 +45,10 @@ fedora-x86_64: variables: CFLAGS: "-coverage -ftest-coverage -fprofile-arcs" script: - - meson ${MESON_COMMON_OPTIONS} + # FIXME: Cannot use MESON_COMMON_OPTIONS here because meson warns about gtkdoc + # feature introduced in 0.52 but we only depends on 0.49. So we cannot build + # with --fatal-meson-warnings. + - meson ${MESON_COMMON_OPTIONS_NO_WARNING} --werror --default-library=both --prefix=$HOME/glib-installed @@ -69,6 +73,15 @@ fedora-x86_64: - "_build/config.h" - "_build/glib/glibconfig.h" - "_build/meson-logs" + - "_build/docs/reference/glib/glib-undeclared.txt" + - "_build/docs/reference/glib/glib-undocumented.txt" + - "_build/docs/reference/glib/glib-unused.txt" + - "_build/docs/reference/gobject/gobject-undeclared.txt" + - "_build/docs/reference/gobject/gobject-undocumented.txt" + - "_build/docs/reference/gobject/gobject-unused.txt" + - "_build/docs/reference/gio/gio-undeclared.txt" + - "_build/docs/reference/gio/gio-undocumented.txt" + - "_build/docs/reference/gio/gio-unused.txt" - "_build/${CI_JOB_NAME}-report.xml" - "_coverage" @@ -439,7 +452,9 @@ dist-job: only: - tags script: - - meson ${MESON_COMMON_OPTIONS} --buildtype release -Dgtk_doc=true -Dman=true _build + # FIXME: Cannot use --fatal-meson-warnings here because meson warns about gtkdoc + # feature introduced in 0.52 but we only depends on 0.49. + - meson ${MESON_COMMON_OPTIONS_NO_WARNING} --buildtype release -Dgtk_doc=true -Dman=true _build - cd _build - ninja dist - ninja glib-doc gobject-doc gio-doc diff --git a/.gitlab-ci/fedora.Dockerfile b/.gitlab-ci/fedora.Dockerfile index 0d5a84cdd..d323e473a 100644 --- a/.gitlab-ci/fedora.Dockerfile +++ b/.gitlab-ci/fedora.Dockerfile @@ -44,6 +44,7 @@ RUN dnf -y install \ ninja-build \ pcre-devel \ python3-dbusmock \ + python3-pygments \ python3-wheel \ shared-mime-info \ systemtap-sdt-devel \ @@ -55,7 +56,7 @@ RUN dnf -y install \ zlib-devel \ && dnf clean all -RUN pip3 install meson==0.49.2 +RUN pip3 install meson==0.52.1 # Enable sudo for wheel users RUN sed -i -e 's/# %wheel/%wheel/' -e '0,/%wheel/{s/%wheel/# %wheel/}' /etc/sudoers diff --git a/meson.build b/meson.build index cbacf0d48..f6ed0fe59 100644 --- a/meson.build +++ b/meson.build @@ -353,7 +353,6 @@ endforeach # Compiler flags if cc.get_id() == 'gcc' or cc.get_id() == 'clang' warning_c_args = [ - '-Wall', '-Wduplicated-branches', '-Wimplicit-fallthrough', '-Wmisleading-indentation',