ci: Set gobject-introspection version and build gobject-introspection in tests

The minimum version is now 1.80.0
This commit is contained in:
Evan Welsh 2024-07-09 01:09:02 -07:00 committed by Philip Withnall
parent ea44c0e4e0
commit 93271385f9
2 changed files with 25 additions and 1 deletions

View File

@ -16,6 +16,7 @@ variables:
DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v19"
ALPINE_IMAGE: "registry.gitlab.gnome.org/gnome/glib/alpine:v3"
MINGW_IMAGE: "registry.gitlab.gnome.org/gnome/glib/mingw:v39.1"
GOBJECT_INTROSPECTION_TAG: "1.80.1"
MESON_TEST_TIMEOUT_MULTIPLIER: 4
G_MESSAGES_DEBUG: all
MESON_COMMON_OPTIONS: "--buildtype debug --wrap-mode=nodownload --fatal-meson-warnings"
@ -105,6 +106,17 @@ variables:
when: manual
allow_failure: true
.build-gobject-introspection:
before_script:
- mkdir -p gobject-introspection
- git clone --branch $GOBJECT_INTROSPECTION_TAG https://gitlab.gnome.org/GNOME/gobject-introspection.git gobject-introspection
- meson gobject-introspection gobject-introspection/build --prefix=/usr
- sudo meson install -C gobject-introspection/build
artifacts:
expire_in: 3 days
paths:
- gobject-introspection
.build-linux:
before_script:
- bash .gitlab-ci/show-execution-environment.sh
@ -167,6 +179,7 @@ style-check-mandatory:
fedora-x86_64:
extends:
- .build-gobject-introspection
- .build-linux
- .only-default-and-merges
- .with-git
@ -179,6 +192,7 @@ fedora-x86_64:
before_script:
- !reference [".build-linux", "before_script"]
- !reference [".with-git", "before_script"]
- !reference [".build-gobject-introspection", "before_script"]
script:
- meson setup ${MESON_COMMON_OPTIONS}
--werror
@ -374,6 +388,7 @@ G_DISABLE_ASSERT:
- .build-linux
- .only-schedules-or-manual
- .with-git
- .build-gobject-introspection
image: $FEDORA_IMAGE
stage: build
needs: []
@ -382,6 +397,7 @@ G_DISABLE_ASSERT:
before_script:
- !reference [".build-linux", "before_script"]
- !reference [".with-git", "before_script"]
- !reference [".build-gobject-introspection", "before_script"]
script:
- meson setup ${MESON_COMMON_OPTIONS}
--werror
@ -412,6 +428,7 @@ valgrind:
- .build-linux
- .only-schedules-or-manual
- .with-git
- .build-gobject-introspection
image: $FEDORA_IMAGE
stage: analysis
needs: []
@ -420,6 +437,7 @@ valgrind:
before_script:
- !reference [".build-linux", "before_script"]
- !reference [".with-git", "before_script"]
- !reference [".build-gobject-introspection", "before_script"]
script:
- meson setup ${MESON_COMMON_OPTIONS}
--werror
@ -748,6 +766,7 @@ scan-build:
extends:
- .build-linux
- .only-schedules-or-manual
- .build-gobject-introspection
image: $FEDORA_IMAGE
stage: analysis
needs: []
@ -768,6 +787,8 @@ scan-build:
--exclude gio/xdgmime/
-disable-checker deadcode.DeadStores
--status-bugs
before_script:
- !reference [".build-gobject-introspection", "before_script"]
script:
- meson setup ${MESON_COMMON_OPTIONS}
--werror
@ -793,12 +814,15 @@ scan-build:
extends:
- .build-linux
- .only-schedules-or-manual-in-default-branch
- .build-gobject-introspection
image: $COVERITY_IMAGE
stage: analysis
needs: []
variables:
# cov-build doesnt like GLIB_DEPRECATED_ENUMERATOR
CFLAGS: '-DGLIB_DISABLE_DEPRECATION_WARNINGS'
before_script:
- !reference [".build-gobject-introspection", "before_script"]
script:
- meson setup ${MESON_COMMON_OPTIONS}
--werror

View File

@ -2600,7 +2600,7 @@ if enable_systemtap
endif
# introspection
gir_scanner = find_program('g-ir-scanner', required: get_option('introspection'))
gir_scanner = find_program('g-ir-scanner', required: get_option('introspection'), version: '>= 1.80.0')
enable_gir = get_option('introspection').allowed() and gir_scanner.found() and meson.can_run_host_binaries()
if get_option('introspection').enabled() and not meson.can_run_host_binaries()