1 image: registry.gitlab.gnome.org/gnome/glib/master:v11
13 MESON_TEST_TIMEOUT_MULTIPLIER: 2
15 MESON_COMMON_OPTIONS: "--buildtype debug --fatal-meson-warnings"
22 CFLAGS: "-coverage -ftest-coverage -fprofile-arcs"
24 - meson ${MESON_COMMON_OPTIONS}
26 --default-library=both
27 --prefix=$HOME/glib-installed
32 -Dinstalled_tests=true
36 - lcov --config-file .gitlab-ci/lcovrc --directory _build --capture --initial --output-file "_coverage/${CI_JOB_NAME}-baseline.lcov"
37 - meson test -C _build --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER} --no-suite flaky
38 - lcov --config-file .gitlab-ci/lcovrc --directory _build --capture --output-file "_coverage/${CI_JOB_NAME}.lcov"
39 # FIXME: We should run all installed tests, but do only this one for now
40 # because it cannot run uninstalled. Reconfigure with dtrace disabled
41 # because it breaks static link.
42 - meson configure -Ddtrace=false _build
43 - ninja -C _build install
44 - GLIB_TEST_COMPILATION=1 $HOME/glib-installed/libexec/installed-tests/glib/static-link.py $HOME/glib-installed/lib/pkgconfig
46 name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
50 - "_build/glib/glibconfig.h"
54 .cross-template: &cross-template
59 name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
64 cross-android_api21_arm64:
68 - meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_android_arm64_21.txt -Diconv=gnu -Dinternal_pcre=true _build
71 cross-android_api28_arm64:
75 - meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_android_arm64_28.txt -Dinternal_pcre=true _build
82 - meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_mingw64.txt _build
95 - C:\msys64\usr\bin\pacman --noconfirm -Syyuu --ask 20
96 - C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
98 name: "glib-%CI_JOB_NAME%-%CI_COMMIT_REF_NAME%"
111 - .gitlab-ci/test-msvc.bat
113 name: "glib-%CI_JOB_NAME%-%CI_COMMIT_REF_NAME%"
121 - branches@GNOME/glib
123 # To run a FreeBSD builder, install gitlab-runner package and start both
124 # gitlab-runner and dbus service because we need /var/lib/dbus/machine-id.
125 # To compile GLib, you still have to install the following packages:
126 # desktop-file-utils gettext libiconv meson pkgconf python3 shared-mime-info
129 # CPPFLAGS is required because libintl doesn't use pkg-config.
130 CPPFLAGS: -I/usr/local/include
131 # FIXME: Workaround meson inability to set LD_LIBRARY_PATH.
132 # https://github.com/mesonbuild/meson/issues/1383
133 # https://github.com/mesonbuild/meson/issues/1635
134 # https://github.com/mesonbuild/meson/issues/2881
135 LDFLAGS: -L/usr/local/lib -Wl,--disable-new-dtags
136 # FreeBSD doesn't have C.UTF-8 locale.
139 # We cannot use -Wl,--no-undefined because GLib uses 'environ' variable.
140 # FreeBSD iconv doesn't handle transliteration, so we use GNU libiconv here.
141 # FreeBSD supports xattr, but its API is different from Linux xattr.
142 # FIXME: extattr(2) support: https://gitlab.gnome.org/GNOME/glib/issues/1404
143 - meson ${MESON_COMMON_OPTIONS} -Db_lundef=false -Diconv=gnu -Dxattr=false _build
145 - meson test -C _build --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" --no-suite flaky
149 name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
153 - "_build/glib/glibconfig.h"
154 - "_build/meson-logs"
161 name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
165 - bash -x ./.gitlab-ci/coverage-docker.sh
166 coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
173 - mv _coverage/ public/
183 - meson --buildtype release --fatal-meson-warnings -Dgtk_doc=true -Dman=true _build
186 - ninja glib-doc gobject-doc gio-doc
187 - tar -c -f "glib-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/glib html
188 - tar -c -f "gobject-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gobject html
189 - tar -c -f "gio-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gio html
192 - "${CI_PROJECT_DIR}/_build/glib-docs.tar.xz"
193 - "${CI_PROJECT_DIR}/_build/gobject-docs.tar.xz"
194 - "${CI_PROJECT_DIR}/_build/gio-docs.tar.xz"
195 - "${CI_PROJECT_DIR}/_build/meson-dist/glib-*.tar.xz"