2018-12-03 01:00:00 +01:00
|
|
|
image: registry.gitlab.gnome.org/gnome/glib/master:v11
|
2018-02-18 15:59:29 +01:00
|
|
|
|
|
|
|
stages:
|
|
|
|
- build
|
2018-04-27 17:04:52 +02:00
|
|
|
- coverage
|
|
|
|
- deploy
|
2018-02-18 15:59:29 +01:00
|
|
|
|
2018-02-22 19:37:16 +01:00
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- _ccache/
|
|
|
|
|
2018-05-26 20:17:15 +02:00
|
|
|
variables:
|
|
|
|
MESON_TEST_TIMEOUT_MULTIPLIER: 2
|
2018-08-16 20:31:55 +02:00
|
|
|
G_MESSAGES_DEBUG: all
|
2018-09-24 16:19:18 +02:00
|
|
|
MESON_COMMON_OPTIONS: "--buildtype debug --fatal-meson-warnings"
|
2018-05-26 20:17:15 +02:00
|
|
|
|
2018-06-22 17:08:06 +02:00
|
|
|
fedora-x86_64:
|
2018-02-18 15:59:29 +01:00
|
|
|
stage: build
|
2018-06-05 19:39:26 +02:00
|
|
|
except:
|
|
|
|
- tags
|
2018-04-27 17:04:52 +02:00
|
|
|
variables:
|
2018-06-05 19:58:48 +02:00
|
|
|
CFLAGS: "-coverage -ftest-coverage -fprofile-arcs"
|
2018-02-18 15:59:29 +01:00
|
|
|
script:
|
2018-09-26 16:56:10 +02:00
|
|
|
- meson ${MESON_COMMON_OPTIONS}
|
|
|
|
--werror
|
|
|
|
--default-library=both
|
|
|
|
--prefix=$HOME/glib-installed
|
|
|
|
--libdir=lib
|
|
|
|
-Dsystemtap=true
|
|
|
|
-Ddtrace=true
|
|
|
|
-Dfam=true
|
|
|
|
-Dinstalled_tests=true
|
|
|
|
_build
|
2018-06-05 19:58:48 +02:00
|
|
|
- ninja -C _build
|
2018-04-27 17:04:52 +02:00
|
|
|
- mkdir -p _coverage
|
2018-10-03 15:47:26 +02:00
|
|
|
- lcov --config-file .gitlab-ci/lcovrc --directory _build --capture --initial --output-file "_coverage/${CI_JOB_NAME}-baseline.lcov"
|
2018-07-06 09:33:22 +02:00
|
|
|
- meson test -C _build --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER}
|
2018-10-03 15:47:26 +02:00
|
|
|
- lcov --config-file .gitlab-ci/lcovrc --directory _build --capture --output-file "_coverage/${CI_JOB_NAME}.lcov"
|
2018-09-26 16:56:10 +02:00
|
|
|
# FIXME: We should run all installed tests, but do only this one for now
|
|
|
|
# because it cannot run uninstalled. Reconfigure with dtrace disabled
|
|
|
|
# because it breaks static link.
|
|
|
|
- meson configure -Ddtrace=false _build
|
|
|
|
- ninja -C _build install
|
|
|
|
- GLIB_TEST_COMPILATION=1 $HOME/glib-installed/libexec/installed-tests/glib/static-link.py $HOME/glib-installed/lib/pkgconfig
|
2018-02-18 15:59:29 +01:00
|
|
|
artifacts:
|
2018-05-29 11:54:29 +02:00
|
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
2018-05-29 11:53:41 +02:00
|
|
|
when: always
|
2018-02-18 15:59:29 +01:00
|
|
|
paths:
|
2018-08-29 12:16:58 +02:00
|
|
|
- "_build/config.h"
|
|
|
|
- "_build/glib/glibconfig.h"
|
2018-06-05 20:01:53 +02:00
|
|
|
- "_build/meson-logs"
|
|
|
|
- "_coverage"
|
2018-02-18 15:59:29 +01:00
|
|
|
|
2018-06-27 15:14:38 +02:00
|
|
|
.cross-template: &cross-template
|
2018-05-20 06:14:56 +02:00
|
|
|
stage: build
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
artifacts:
|
2018-06-05 20:01:53 +02:00
|
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
|
|
|
when: always
|
2018-05-20 06:14:56 +02:00
|
|
|
paths:
|
2018-06-05 20:01:53 +02:00
|
|
|
- "_build/meson-logs"
|
2018-05-20 06:14:56 +02:00
|
|
|
|
2018-08-23 21:53:29 +02:00
|
|
|
fedora-autotools-x86_64:
|
|
|
|
stage: build
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
variables:
|
|
|
|
CFLAGS: "-Werror"
|
|
|
|
V: "1"
|
|
|
|
MAKEFLAGS: "-j8"
|
|
|
|
script:
|
|
|
|
- mkdir _build
|
|
|
|
- cd _build
|
|
|
|
- ../autogen.sh --enable-always-build-tests --enable-systemtap --enable-dtrace
|
|
|
|
- make
|
|
|
|
- make check
|
|
|
|
artifacts:
|
|
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
|
|
|
when: always
|
|
|
|
paths:
|
2018-08-29 12:16:58 +02:00
|
|
|
- "_build/config.h"
|
|
|
|
- "_build/glib/glibconfig.h"
|
2018-08-23 21:53:29 +02:00
|
|
|
- "_build/*.log"
|
|
|
|
- "_build/*/*.log"
|
|
|
|
- "_build/*/*/*.log"
|
|
|
|
- "_build/*/*/*/*.log"
|
|
|
|
- "_build/*/*/*/*/*.log"
|
|
|
|
- "_build/*/*/*/*/*/*.log"
|
|
|
|
|
2018-06-27 15:14:38 +02:00
|
|
|
cross-android_api21_arm64:
|
|
|
|
<<: *cross-template
|
|
|
|
script:
|
|
|
|
# FIXME: add --werror
|
2018-09-24 16:19:18 +02:00
|
|
|
- meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_android_arm64_21.txt -Diconv=gnu -Dinternal_pcre=true _build
|
2018-06-27 15:14:38 +02:00
|
|
|
- ninja -C _build
|
|
|
|
|
2018-06-26 19:18:29 +02:00
|
|
|
cross-android_api28_arm64:
|
|
|
|
<<: *cross-template
|
|
|
|
script:
|
|
|
|
# FIXME: add --werror
|
2018-09-24 16:19:18 +02:00
|
|
|
- meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_android_arm64_28.txt -Dinternal_pcre=true _build
|
2018-06-26 19:18:29 +02:00
|
|
|
- ninja -C _build
|
|
|
|
|
2018-06-22 17:08:06 +02:00
|
|
|
cross-mingw64:
|
2018-06-27 15:14:38 +02:00
|
|
|
<<: *cross-template
|
2018-05-20 21:17:48 +02:00
|
|
|
script:
|
|
|
|
# FIXME: Add --werror
|
2018-09-24 16:19:18 +02:00
|
|
|
- meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_mingw64.txt _build
|
2018-05-20 21:17:48 +02:00
|
|
|
- ninja -C _build
|
|
|
|
|
2018-02-22 19:37:16 +01:00
|
|
|
msys2-mingw32:
|
|
|
|
stage: build
|
2018-06-05 19:39:26 +02:00
|
|
|
except:
|
|
|
|
- tags
|
2018-02-22 19:37:16 +01:00
|
|
|
tags:
|
|
|
|
- win32
|
|
|
|
variables:
|
|
|
|
MSYSTEM: "MINGW32"
|
|
|
|
CHERE_INVOKING: "yes"
|
|
|
|
script:
|
|
|
|
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu --ask 20
|
|
|
|
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
|
2018-04-27 17:04:52 +02:00
|
|
|
artifacts:
|
2018-05-29 11:54:29 +02:00
|
|
|
name: "glib-%CI_JOB_NAME%-%CI_COMMIT_REF_NAME%"
|
2018-05-28 14:11:22 +02:00
|
|
|
when: always
|
2018-04-27 17:04:52 +02:00
|
|
|
paths:
|
2018-05-28 14:11:22 +02:00
|
|
|
- _build/meson-logs
|
2018-04-27 17:04:52 +02:00
|
|
|
- _coverage/
|
|
|
|
|
2018-05-24 19:18:25 +02:00
|
|
|
vs2017-x64:
|
|
|
|
stage: build
|
2018-06-05 19:39:26 +02:00
|
|
|
except:
|
|
|
|
- tags
|
2018-05-24 19:18:25 +02:00
|
|
|
tags:
|
|
|
|
- win32
|
|
|
|
script:
|
|
|
|
- .gitlab-ci/test-msvc.bat
|
|
|
|
artifacts:
|
2018-05-29 11:54:29 +02:00
|
|
|
name: "glib-%CI_JOB_NAME%-%CI_COMMIT_REF_NAME%"
|
2018-05-24 19:18:25 +02:00
|
|
|
when: always
|
|
|
|
paths:
|
|
|
|
- _build/meson-logs
|
|
|
|
|
2018-05-24 17:14:25 +02:00
|
|
|
freebsd-11-x86_64:
|
|
|
|
stage: build
|
2018-10-09 16:54:48 +02:00
|
|
|
only:
|
|
|
|
- branches@GNOME/glib
|
2018-05-24 17:14:25 +02:00
|
|
|
tags:
|
|
|
|
# To run a FreeBSD builder, install gitlab-runner package and start both
|
|
|
|
# gitlab-runner and dbus service because we need /var/lib/dbus/machine-id.
|
|
|
|
# To compile GLib, you still have to install the following packages:
|
|
|
|
# desktop-file-utils gettext libiconv meson pkgconf python3 shared-mime-info
|
|
|
|
- freebsd-11
|
|
|
|
variables:
|
|
|
|
# CPPFLAGS is required because libintl doesn't use pkg-config.
|
|
|
|
CPPFLAGS: -I/usr/local/include
|
|
|
|
# FIXME: Workaround meson inability to set LD_LIBRARY_PATH.
|
|
|
|
# https://github.com/mesonbuild/meson/issues/1383
|
|
|
|
# https://github.com/mesonbuild/meson/issues/1635
|
|
|
|
# https://github.com/mesonbuild/meson/issues/2881
|
|
|
|
LDFLAGS: -L/usr/local/lib -Wl,--disable-new-dtags
|
|
|
|
# FreeBSD doesn't have C.UTF-8 locale.
|
|
|
|
LANG: en_US.UTF-8
|
|
|
|
script:
|
|
|
|
# We cannot use -Wl,--no-undefined because GLib uses 'environ' variable.
|
|
|
|
# FreeBSD iconv doesn't handle transliteration, so we use GNU libiconv here.
|
|
|
|
# FreeBSD supports xattr, but its API is different from Linux xattr.
|
|
|
|
# FIXME: extattr(2) support: https://gitlab.gnome.org/GNOME/glib/issues/1404
|
2018-09-24 16:19:18 +02:00
|
|
|
- meson ${MESON_COMMON_OPTIONS} -Db_lundef=false -Diconv=gnu -Dxattr=false _build
|
2018-05-24 17:14:25 +02:00
|
|
|
- ninja -C _build
|
|
|
|
- meson test -C _build --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}"
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
artifacts:
|
|
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
|
|
|
when: always
|
|
|
|
paths:
|
2018-09-28 19:01:12 +02:00
|
|
|
- "_build/config.h"
|
|
|
|
- "_build/glib/glibconfig.h"
|
2018-05-24 17:14:25 +02:00
|
|
|
- "_build/meson-logs"
|
|
|
|
|
2018-04-27 17:04:52 +02:00
|
|
|
coverage:
|
|
|
|
stage: coverage
|
2018-08-30 14:50:45 +02:00
|
|
|
except:
|
|
|
|
- tags
|
2018-04-27 17:04:52 +02:00
|
|
|
artifacts:
|
2018-05-29 11:54:29 +02:00
|
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
2018-04-27 17:04:52 +02:00
|
|
|
paths:
|
|
|
|
- _coverage/
|
|
|
|
script:
|
|
|
|
- bash -x ./.gitlab-ci/coverage-docker.sh
|
2018-05-25 00:43:03 +02:00
|
|
|
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
|
2018-04-27 17:04:52 +02:00
|
|
|
|
|
|
|
pages:
|
|
|
|
stage: deploy
|
2018-06-05 19:39:26 +02:00
|
|
|
only:
|
|
|
|
- master
|
2018-04-27 17:04:52 +02:00
|
|
|
script:
|
|
|
|
- mv _coverage/ public/
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|
2018-02-22 19:37:16 +01:00
|
|
|
|
2018-02-18 15:59:29 +01:00
|
|
|
dist-job:
|
|
|
|
stage: build
|
|
|
|
only:
|
|
|
|
- tags
|
|
|
|
script:
|
2018-09-24 16:19:18 +02:00
|
|
|
- meson --buildtype release --fatal-meson-warnings -Dgtk_doc=true -Dman=true _build
|
2018-02-18 15:59:29 +01:00
|
|
|
- cd _build
|
|
|
|
- ninja dist
|
2018-06-18 15:47:39 +02:00
|
|
|
- ninja glib-doc gobject-doc gio-doc
|
2018-02-18 15:59:29 +01:00
|
|
|
- tar -c -f "glib-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/glib html
|
|
|
|
- tar -c -f "gobject-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gobject html
|
|
|
|
- tar -c -f "gio-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gio html
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- "${CI_PROJECT_DIR}/_build/glib-docs.tar.xz"
|
|
|
|
- "${CI_PROJECT_DIR}/_build/gobject-docs.tar.xz"
|
|
|
|
- "${CI_PROJECT_DIR}/_build/gio-docs.tar.xz"
|
|
|
|
- "${CI_PROJECT_DIR}/_build/meson-dist/glib-*.tar.xz"
|