Commit 0da7ae33 authored by Martin Blanchard's avatar Martin Blanchard

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
#37
parent f5377d5f
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
......@@ -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,
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment