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