[citemplates/ebassi/publish_docs] Add CI templates for generating documentation
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [citemplates/ebassi/publish_docs] Add CI templates for generating documentation
- Date: Wed, 25 Aug 2021 18:52:40 +0000 (UTC)
commit 5637ea0bf8dfe834814c54c6729387437b65242e
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed Aug 25 19:43:30 2021 +0100
Add CI templates for generating documentation
GNOME projects can use these CI templates to build their API reference
and publish it as a CI artefact.
docs/gidocgen.yml | 27 +++++++++++++++++++++++++++
docs/gtkdoc.yml | 28 ++++++++++++++++++++++++++++
2 files changed, 55 insertions(+)
---
diff --git a/docs/gidocgen.yml b/docs/gidocgen.yml
new file mode 100644
index 0000000..039d008
--- /dev/null
+++ b/docs/gidocgen.yml
@@ -0,0 +1,27 @@
+# Expected variables:
+# PROJECT_DEPS: the dependencies for your own project
+# MESON_VERSION: the version of Meson you depend on
+# MESON_EXTRA_FLAGS: additional Meson setup options you wish to pass to the configuration phase
+# DOCS_FLAGS: the Meson setup option for enabling the documentation, if any
+# DOCS_PATH: the path of the generated reference, relative to the build root
+.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 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
diff --git a/docs/gtkdoc.yml b/docs/gtkdoc.yml
new file mode 100644
index 0000000..2928340
--- /dev/null
+++ b/docs/gtkdoc.yml
@@ -0,0 +1,28 @@
+# Expected variables:
+# PROJECT_DEPS: the dependencies for your own project
+# MESON_VERSION: the version of Meson you depend on
+# MESON_EXTRA_FLAGS: additional Meson setup options you wish to pass to the configuration phase
+# DOCS_FLAGS: the Meson setup option for enabling the documentation, if any
+# DOCS_TARGET: the Meson target for building the documentation, if any
+# DOCS_PATH: the path of the generated reference, relative to the build root
+.gtkdoc-build:
+ image: fedora:latest
+ before_script:
+ - export PATH="$HOME/.local/bin:$PATH"
+ - dnf install -y python3 python3-pip python3-wheel gtk-doc ninja-build redhat-rpm-config
+ - dnf install -y ${PROJECT_DEPS}
+ - pip3 install --user meson==${MESON_VERSION}
+ script:
+ - meson setup ${MESON_EXTRA_FLAGS} ${DOCS_FLAGS} _docs .
+ - ninja -C _docs ${DOCS_TARGET}
+ - |
+ 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]