[json-glib/gidocgen] ci: Restructure the pipeline
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib/gidocgen] ci: Restructure the pipeline
- Date: Tue, 8 Jun 2021 15:47:36 +0000 (UTC)
commit e9aaf36696f3a62f2eb5651b5790b6a8751a5e5c
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Jun 8 16:41:55 2021 +0100
ci: Restructure the pipeline
Build json-glib in its own job.
Build the json-glib API reference separately, and then publish it.
.gitlab-ci.yml | 87 ++++++++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 67 insertions(+), 20 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3668e75..2caddbf 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,36 +1,83 @@
-image: fedora:33
+image: fedora:34
stages:
- build
+ - docs
+ - deploy
-before_script:
- - dnf install -y gcc gettext git glib2-devel gobject-introspection-devel gtk-doc meson ninja-build
redhat-rpm-config
-
-build-json-glib:
- stage: build
+.build-default:
+ before_script:
+ - dnf install -y ${FEDORA_DEPS}
+ - pip3 install --user meson==${MESON_VERSION}
+ - export PATH="$PATH:$HOME/.local/bin"
script:
- - meson setup --prefix /usr -Dman=true _build .
+ - meson setup ${MESON_EXTRA_FLAGS} --prefix /usr _build .
- meson compile -C _build
- meson test -C _build
- except:
- - tags
+ - meson install -C _build
artifacts:
- when: on_failure
+ when: always
name: "json-glib-${CI_COMMIT_REF_NAME}"
paths:
- "${CI_PROJECT_DIR}/_build/meson-logs"
-dist-json-glib:
+fedora-x86_64:
+ extends: .build-default
stage: build
- only:
- - tags
+ needs: []
+ variables:
+ FEDORA_DEPS:
+ gcc
+ gettext
+ git
+ glib2-devel
+ gobject-introspection-devel
+ ninja-build
+ python3
+ python3-pip
+ python3-wheel
+ redhat-rpm-config
+ MESON_VERSION: "0.55.3"
+ MESON_EXTRA_FLAGS: "--buildtype=debug --default-library=both -Dwerror=true -Dglib:werror=false
-Dintrospection=enabled"
+
+reference:
+ extends: .build-default
+ stage: docs
+ needs: []
+ variables:
+ FEDORA_DEPS:
+ gcc
+ gettext
+ git
+ glib2-devel
+ gobject-introspection-devel
+ graphviz
+ ninja-build
+ python3
+ python3-jinja2
+ python3-markdown
+ python3-pip
+ python3-pygments
+ python3-toml
+ python3-typogrify
+ python3-wheel
+ redhat-rpm-config
+ libxslt
+ MESON_EXTRA_FLAGS: "-Dgtk_doc=enabled -Dman=true -Dintrospection=enabled"
+ after_script:
+ - mkdir _reference
+ - mv _build/doc/json-glib-1.0/ _reference/
+ artifacts:
+ paths:
+ - _reference
+
+pages:
+ stage: deploy
+ needs: ['reference']
script:
- - meson setup --prefix /usr --buildtype release -Dman=true -Dgtk_doc=enabled_build .
- - meson compile -C _build
- - meson dist -C _build
- - ninja -C _build json-glib-doc
- - tar -c -f "json-glib-docs-${CI_COMMIT_TAG}.tar.xz" -C docs html
+ - mv _reference _public
artifacts:
paths:
- - "${CI_PROJECT_DIR}/_build/json-glib-docs-${CI_COMMIT_TAG}.tar.xz"
- - "${CI_PROJECT_DIR}/_build/meson-dist/json-glib-*.tar.xz"
+ - public
+ only:
+ - master
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]