summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2018-08-09 12:20:49 +0100
committerPhilip Withnall <withnall@endlessm.com>2018-08-10 11:39:57 +0100
commit019299fefe2948845f9e038c9c411248ab47d232 (patch)
tree76ad116fe30e96c30a1db8321e5b1f5c8b8e8fa5 /.gitlab-ci.yml
parent093a9f4268d2484118319b9a7f60c20d254d4976 (diff)
downloaddconf-019299fefe2948845f9e038c9c411248ab47d232.tar.gz
build: Add GitLab CI support
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml64
1 files changed, 64 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..9ef52c9
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,64 @@
+image: debian:unstable
+
+before_script:
+ - apt update -qq
+ - apt install -y -qq build-essential meson pkg-config gtk-doc-tools
+ libxml2-utils gobject-introspection dbus dbus-x11
+ libgirepository1.0-dev libglib2.0-dev
+ lcov valac
+ - export LANG=C.UTF-8
+
+stages:
+ - build
+ - test
+ - deploy
+
+build-job:
+ stage: build
+ script:
+ - meson --buildtype debug --werror _build .
+ - ninja -C _build
+ except:
+ - tags
+ artifacts:
+ when: on_failure
+ name: "dconf-_${CI_COMMIT_REF_NAME}"
+ paths:
+ - "${CI_PROJECT_DIR}/_build/meson-logs"
+
+test:
+ stage: test
+ script:
+ - meson _build . -Db_coverage=true
+ - ninja -C _build test
+ - ninja -C _build coverage
+ coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
+
+# FIXME: Run gtkdoc-check when we can. See:
+# https://github.com/mesonbuild/meson/issues/3580
+
+dist-job:
+ stage: build
+ only:
+ - tags
+ script:
+ - meson --buildtype release _build .
+ - ninja -C _build dist
+ artifacts:
+ paths:
+ - "${CI_PROJECT_DIR}/_build/meson-dist/dconf-*.tar.xz"
+
+pages:
+ stage: deploy
+ only:
+ - master
+ script:
+ - meson -Db_coverage=true -Ddocumentation=true _build .
+ - ninja -C _build test dconf-doc
+ - ninja -C _build coverage
+ - mkdir -p public/
+ - mv _build/dconf/docs/html/ public/docs/
+ - mv _build/meson-logs/coveragereport/ public/coverage/
+ artifacts:
+ paths:
+ - public \ No newline at end of file