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 - .gitlab-ci/run-tests.sh
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
47 junit: "_build/${CI_JOB_NAME}-report.xml"
48 name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
52 - "_build/glib/glibconfig.h"
54 - "_build/${CI_JOB_NAME}-report.xml"
62 CPPFLAGS: "-DG_DISABLE_ASSERT"
64 - meson ${MESON_COMMON_OPTIONS}
69 -Dinstalled_tests=true
72 - bash -x ./.gitlab-ci/run-tests.sh
75 junit: "_build/${CI_JOB_NAME}-report.xml"
76 name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
80 - "_build/glib/glibconfig.h"
82 - "_build/${CI_JOB_NAME}-report.xml"
84 .cross-template: &cross-template
89 name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
94 cross-android_api21_arm64:
98 # We use -Diconv=auto to test that we successfully detect that iconv is not
99 # provided by android api 21, and detect the external iconv instead.
100 - meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_android_arm64_21.txt -Diconv=auto -Dinternal_pcre=true _build
103 cross-android_api28_arm64:
106 # FIXME: add --werror
107 - meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_android_arm64_28.txt -Dinternal_pcre=true _build
113 # FIXME: Add --werror
114 - meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_mingw64.txt _build
125 CHERE_INVOKING: "yes"
127 - C:\msys64\usr\bin\pacman --noconfirm -Syyuu --ask 20
128 - C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
131 junit: "_build/%CI_JOB_NAME%-report.xml"
132 name: "glib-%CI_JOB_NAME%-%CI_COMMIT_REF_NAME%"
136 - "_build/%CI_JOB_NAME%-report.xml"
146 - .gitlab-ci/test-msvc.bat
149 junit: "_build/%CI_JOB_NAME%-report.xml"
150 name: "glib-%CI_JOB_NAME%-%CI_COMMIT_REF_NAME%"
154 - "_build/%CI_JOB_NAME%-report.xml"
159 - branches@GNOME/glib
161 # To run a FreeBSD builder, install gitlab-runner package and start both
162 # gitlab-runner and dbus service because we need /var/lib/dbus/machine-id.
163 # To compile GLib, you still have to install the following packages:
164 # desktop-file-utils gettext libiconv meson pkgconf python3 shared-mime-info
167 # CPPFLAGS is required because libintl doesn't use pkg-config.
168 CPPFLAGS: -I/usr/local/include
169 # FIXME: Workaround meson inability to set LD_LIBRARY_PATH.
170 # https://github.com/mesonbuild/meson/issues/1383
171 # https://github.com/mesonbuild/meson/issues/1635
172 # https://github.com/mesonbuild/meson/issues/2881
173 LDFLAGS: -L/usr/local/lib -Wl,--disable-new-dtags
174 # FreeBSD doesn't have C.UTF-8 locale.
177 # We cannot use -Wl,--no-undefined because GLib uses 'environ' variable.
178 # FreeBSD iconv doesn't handle transliteration, so we use (external) GNU libiconv here.
179 # FreeBSD supports xattr, but its API is different from Linux xattr.
180 # FIXME: extattr(2) support: https://gitlab.gnome.org/GNOME/glib/issues/1404
181 - meson ${MESON_COMMON_OPTIONS} -Db_lundef=false -Diconv=external -Dxattr=false _build
183 - bash -x ./.gitlab-ci/run-tests.sh
188 junit: "_build/${CI_JOB_NAME}-report.xml"
189 name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
193 - "_build/glib/glibconfig.h"
194 - "_build/meson-logs"
195 - "_build/${CI_JOB_NAME}-report.xml"
202 name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
206 - bash -x ./.gitlab-ci/coverage-docker.sh
207 coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
214 - mv _coverage/ public/
224 - meson --buildtype release --fatal-meson-warnings -Dgtk_doc=true -Dman=true _build
227 - ninja glib-doc gobject-doc gio-doc
228 - tar -c -f "glib-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/glib html
229 - tar -c -f "gobject-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gobject html
230 - tar -c -f "gio-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gio html
233 - "${CI_PROJECT_DIR}/_build/glib-docs.tar.xz"
234 - "${CI_PROJECT_DIR}/_build/gobject-docs.tar.xz"
235 - "${CI_PROJECT_DIR}/_build/gio-docs.tar.xz"
236 - "${CI_PROJECT_DIR}/_build/meson-dist/glib-*.tar.xz"