summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorGünther Wagner <info@gunibert.de>2021-10-21 19:36:05 +0200
committerGünther Wagner <info@gunibert.de>2021-10-21 20:04:40 +0200
commit1b7bd9a0b709672768ef3b4463a06039c5bf1dac (patch)
tree2d6726357190e9cc19d54ab331a7e2347f4c7d90 /.gitlab-ci.yml
parentc10242ed45eb6bcb5f27a2a2e7b7eda944324179 (diff)
downloadlibrest-1b7bd9a0b709672768ef3b4463a06039c5bf1dac.tar.gz
Add gi-docgen and proper documentation CI
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml57
1 files changed, 56 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 53873dd..e897e44 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,9 @@
-image: fedora:latest
+image: fedora:34
stages:
- build
+ - docs
+ - deploy
build-librest:
stage: build
@@ -25,3 +27,56 @@ build-librest:
- "_build/config.h"
- "_build/meson-logs"
- "_build/${CI_JOB_NAME}-report.xml"
+
+.gidocgen-build:
+ image: fedora:latest
+ before_script:
+ - export PATH="$HOME/.local/bin:$PATH"
+ - dnf install -y python3 python3-pip python3-wheel gobject-introspection-devel graphviz ninja-build redhat-rpm-config
+ - dnf install -y ${PROJECT_DEPS}
+ - pip3 install --user meson==${MESON_VERSION} gi-docgen jinja2 Markdown markupsafe pygments toml typogrify
+ script:
+ - meson setup ${MESON_EXTRA_FLAGS} ${DOCS_FLAGS} _docs .
+ - meson compile -C _docs
+ - |
+ pushd "_docs/${DOCS_PATH}" > /dev/null
+ tar cf ${CI_PROJECT_NAME}-docs.tar .
+ popd > /dev/null
+ - mv _docs/${DOCS_PATH}/${CI_PROJECT_NAME}-docs.tar .
+ artifacts:
+ when: always
+ name: 'Documentation'
+ expose_as: 'Download the API reference'
+ paths:
+ - ${CI_PROJECT_NAME}-docs.tar
+
+reference:
+ stage: docs
+ needs: []
+ extends: .gidocgen-build
+ variables:
+ PROJECT_DEPS:
+ docbook-style-xsl
+ gcc
+ gettext
+ git
+ glib2-devel
+ libxslt
+ libsoup-devel
+ gtk-doc
+ MESON_VERSION: "0.55.3"
+ MESON_EXTRA_FLAGS: "-Dintrospection=true"
+ DOCS_FLAGS: -Dgtk_doc=true
+ DOCS_PATH: docs/librest-1.0
+
+pages:
+ stage: deploy
+ needs: ['reference']
+ script:
+ - mkdir public && cd public
+ - tar xf ../${CI_PROJECT_NAME}-docs.tar
+ artifacts:
+ paths:
+ - public
+ only:
+ - master