[libchamplain: 2/3] Add simple CI for build + docs publishing



commit 0da7ae335a1e479ae3c03e5d52376d199c4eeea6
Author: Martin Blanchard <tchaik gmx com>
Date:   Sun Aug 19 15:24:42 2018 +0100

    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

 .gitlab-ci.yml                 | 71 ++++++++++++++++++++++++++++++++++++++++++
 docs/reference-gtk/meson.build |  2 +-
 docs/reference/meson.build     |  2 +-
 3 files changed, 73 insertions(+), 2 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
diff --git a/docs/reference-gtk/meson.build b/docs/reference-gtk/meson.build
index 45dc105..ca5578f 100644
--- a/docs/reference-gtk/meson.build
+++ b/docs/reference-gtk/meson.build
@@ -34,7 +34,7 @@ libchamplain_gtk_reference_fixxref_args = [
 ]
 
 gnome.gtkdoc(
-  package_gtk_string,
+  package_gtk_name,
   main_sgml: 'libchamplain-gtk-docs.sgml',
   gobject_typesfile: files('libchamplain-gtk.types'),
   src_dir: libchamplain_gtk_srcdir,
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index f4c83d2..fb957eb 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -55,7 +55,7 @@ libchamplain_reference_fixxref_args = [
 ]
 
 gnome.gtkdoc(
-  package_string,
+  package_name,
   main_sgml: 'libchamplain-docs.sgml',
   gobject_typesfile: files('libchamplain.types'),
   src_dir: libchamplain_srcdir,


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