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