summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorMartin Blanchard <tchaik@gmx.com>2018-08-19 15:24:42 +0100
committerMartin Blanchard <tchaik@gmx.com>2019-02-04 16:11:36 +0000
commit0da7ae335a1e479ae3c03e5d52376d199c4eeea6 (patch)
tree03b9aeb5ac5b2687f83efbb31ebe22b43abc5f02 /.gitlab-ci.yml
parentf5377d5fdcdb0a3bbc292335103a9fcd791e97ea (diff)
downloadlibchamplain-0da7ae335a1e479ae3c03e5d52376d199c4eeea6.tar.gz
Add simple CI for build + docs publishing
Publish documentation on GitLab pages as meson does not embed generated documentation in distribution tarballs. Pages URLs: https://gnome.pages.gitlab.gnome.org/libchamplain/champlain https://gnome.pages.gitlab.gnome.org/libchamplain/champlain-gtk https://bugzilla.gnome.org/show_bug.cgi?id=794324 https://gitlab.gnome.org/GNOME/libchamplain/issues/37
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml71
1 files changed, 71 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..d7474e7
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,71 @@
+image: fedora:29
+
+stages:
+ - build
+ - deploy
+
+before_script:
+ - dnf install -y gcc ccache gettext gtk-doc meson ninja-build redhat-rpm-config
+ - dnf install -y glib2-devel clutter-devel gtk3-devel clutter-gtk-devel cairo-devel sqlite-devel libsoup-devel gobject-introspection-devel
+
+.ccache-setup: &ccache-setup
+ variables:
+ CCACHE_BASEDIR: "${PWD}"
+ CCACHE_DIR: "${CCACHE_BASEDIR}/_ccache"
+
+build-champlain:
+ stage: build
+ script:
+ - mkdir -p _ccache
+ - ccache --zero-stats
+ - ccache --show-stats
+ - meson -Dwidgetry=false -Dgtk_doc=true _build .
+ - ninja -C _build
+ - ninja -C _build test
+ - ninja -C _build champlain-doc
+ - ccache --show-stats
+ artifacts:
+ name: "champlain-gtk"
+ paths:
+ - _build/docs/reference/html
+ cache:
+ key: "$CI_JOB_NAME"
+ paths:
+ - _ccache/
+ <<: *ccache-setup
+
+build-champlain-gtk:
+ stage: build
+ script:
+ - mkdir -p _ccache
+ - ccache --zero-stats
+ - ccache --show-stats
+ - meson -Dwidgetry=true -Dgtk_doc=true _build .
+ - ninja -C _build
+ - ninja -C _build test
+ - ninja -C _build champlain-gtk-doc
+ - ccache --show-stats
+ artifacts:
+ name: "champlain-gtk-doc"
+ paths:
+ - _build/docs/reference-gtk/html
+ cache:
+ key: "$CI_JOB_NAME"
+ paths:
+ - _ccache/
+ <<: *ccache-setup
+
+pages:
+ stage: deploy
+ dependencies:
+ - build-champlain
+ - build-champlain-gtk
+ script:
+ - mkdir -p public/
+ - mv _build/docs/reference/html/ public/champlain/
+ - mv _build/docs/reference-gtk/html/ public/champlain-gtk/
+ artifacts:
+ paths:
+ - public
+ only:
+ - master