From 0447d5e1f7641d808d6abda19524635ec6ce9bf2 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 26 Feb 2019 17:51:09 +0000 Subject: [PATCH] ci: Add CI configuration Signed-off-by: Philip Withnall --- .gitlab-ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..ed8ba31 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,48 @@ +image: debian:unstable + +before_script: + - apt update -qq + - apt install -y -qq build-essential meson pkg-config gtk-doc-tools + libxml2-utils gobject-introspection + libgirepository1.0-dev libglib2.0-dev + gettext libdbus-1-dev libpolkit-gobject-1-dev git + policykit-1 lcov + - export LANG=C.UTF-8 + +stages: + - build + - deploy + +cache: + paths: + - _ccache/ + +debian-unstable: + stage: build + except: + - tags + script: + - git submodule update --init + - meson --buildtype debug --werror -Db_coverage=true -Ddocumentation=true _build . + - meson test -C _build + - ninja -C _build coverage + coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/' + artifacts: + when: always + name: "malcontent-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" + paths: + - "_build/meson-logs" + +# FIXME: Run gtkdoc-check when we can. See: +# https://github.com/mesonbuild/meson/issues/3580 + +pages: + stage: deploy + only: + - master + script: + - mkdir -p public/ + - mv _build/meson-logs/coveragereport/ public/coverage/ + artifacts: + paths: + - public