[hitori/ci] ci: Add GitLab CI



commit ecfde5ebb34f62d487404ca39de2949883f84f9e
Author: Philip Withnall <withnall endlessm com>
Date:   Tue Feb 19 15:58:30 2019 +0000

    ci: Add GitLab CI
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 .gitlab-ci.yml | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..d41f472
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,37 @@
+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
+                       libglib2.0-dev
+                       lcov
+  - export LANG=C.UTF-8
+
+stages:
+  - build
+  - test
+
+build-job:
+  stage: build
+  script:
+    - meson --buildtype debug --werror _build .
+    - ninja -C _build
+  except:
+    - tags
+  artifacts:
+    when: on_failure
+    name: "hitori-_${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
\ No newline at end of file


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]