1 image: registry.gitlab.gnome.org/gnome/glib/master:v6
13 MESON_TEST_TIMEOUT_MULTIPLIER: 2
21 CFLAGS: "-coverage -ftest-coverage -fprofile-arcs"
23 - meson --buildtype debug --werror -Dsystemtap=true -Ddtrace=true -Dfam=true _build .
26 - lcov --rc lcov_branch_coverage=1 --directory _build --capture --initial --output-file "_coverage/${CI_JOB_NAME}-baseline.lcov"
27 - meson test -C _build --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER}
28 - lcov --rc lcov_branch_coverage=1 --directory _build --capture --output-file "_coverage/${CI_JOB_NAME}.lcov"
30 name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
36 .cross-template: &cross-template
41 name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
46 cross-android_api21_arm64:
50 - meson --cross-file=/opt/cross_file_android_arm64_21.txt -Diconv=gnu -Dinternal_pcre=true --buildtype debug _build
53 cross-android_api28_arm64:
57 - meson --cross-file=/opt/cross_file_android_arm64_28.txt -Dinternal_pcre=true --buildtype debug _build
64 - meson --cross-file=/opt/cross_file_mingw64.txt --buildtype debug _build
77 - C:\msys64\usr\bin\pacman --noconfirm -Syyuu --ask 20
78 - C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
80 name: "glib-%CI_JOB_NAME%-%CI_COMMIT_REF_NAME%"
93 - .gitlab-ci/test-msvc.bat
95 name: "glib-%CI_JOB_NAME%-%CI_COMMIT_REF_NAME%"
104 # To run a FreeBSD builder, install gitlab-runner package and start both
105 # gitlab-runner and dbus service because we need /var/lib/dbus/machine-id.
106 # To compile GLib, you still have to install the following packages:
107 # desktop-file-utils gettext libiconv meson pkgconf python3 shared-mime-info
110 # CPPFLAGS is required because libintl doesn't use pkg-config.
111 CPPFLAGS: -I/usr/local/include
112 # FIXME: Workaround meson inability to set LD_LIBRARY_PATH.
113 # https://github.com/mesonbuild/meson/issues/1383
114 # https://github.com/mesonbuild/meson/issues/1635
115 # https://github.com/mesonbuild/meson/issues/2881
116 LDFLAGS: -L/usr/local/lib -Wl,--disable-new-dtags
117 # FreeBSD doesn't have C.UTF-8 locale.
120 # We cannot use -Wl,--no-undefined because GLib uses 'environ' variable.
121 # FreeBSD iconv doesn't handle transliteration, so we use GNU libiconv here.
122 # FreeBSD supports xattr, but its API is different from Linux xattr.
123 # FIXME: extattr(2) support: https://gitlab.gnome.org/GNOME/glib/issues/1404
124 - meson -Db_lundef=false -Diconv=gnu -Dxattr=false --buildtype debug _build
126 - meson test -C _build --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}"
127 # FIXME: Remove this when we have a stable FreeBSD runner
128 # https://gitlab.gnome.org/Infrastructure/GitLab/issues/286
133 name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
136 - "_build/meson-logs"
141 name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
145 - bash -x ./.gitlab-ci/coverage-docker.sh
146 coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
153 - mv _coverage/ public/
163 - meson --buildtype release -Dgtk_doc=true -Dman=true _build
166 - ninja glib-doc gobject-doc gio-doc
167 - tar -c -f "glib-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/glib html
168 - tar -c -f "gobject-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gobject html
169 - tar -c -f "gio-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gio html
172 - "${CI_PROJECT_DIR}/_build/glib-docs.tar.xz"
173 - "${CI_PROJECT_DIR}/_build/gobject-docs.tar.xz"
174 - "${CI_PROJECT_DIR}/_build/gio-docs.tar.xz"
175 - "${CI_PROJECT_DIR}/_build/meson-dist/glib-*.tar.xz"