[gtkmm-documentation/ebassi/ci-publish] Add a CI pipeline for building, validating, and publishing
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm-documentation/ebassi/ci-publish] Add a CI pipeline for building, validating, and publishing
- Date: Sun, 1 Aug 2021 17:25:18 +0000 (UTC)
commit 21298c7130c2cdad121e4e6f881a5194ba2b2a4e
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sun Aug 1 18:12:38 2021 +0100
Add a CI pipeline for building, validating, and publishing
We run the build using Meson, split into three stages:
- validation
- build
- deployment
The validation phase runs the build with -Dvalidation=true; the build
phase runs the build with just the HTML generation and without
translations, for the moment; the deployment phase takes the build
artifacts and publishes them on the GitLab pages space for the project.
.gitlab-ci.yml | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..d2269e3
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,61 @@
+stages:
+ - validate
+ - build
+ - deploy
+
+.build-default:
+ image: "fedora:34"
+ before_script:
+ - export PATH="$HOME/.local/bin:$PATH"
+ - dnf install -y ${FEDORA_DEPS}
+ - pip install --user meson==${MESON_VERSION}
+ script:
+ - meson setup ${MESON_OPTIONS} _build .
+ - meson compile -C _build
+
+docs-validation:
+ extends: .build-default
+ stage: validate
+ variables:
+ FEDORA_DEPS:
+ gcc
+ gcc-c++
+ gettext
+ itstool
+ libxml2
+ libxslt
+ ninja-build
+ python3
+ python3-pip
+ python3-wheel
+ MESON_VERSION: "0.50.0"
+ MESON_OPTIONS: "-Dbuild-examples=false -Dvalidation=true -Dbuild-translations=true -Dbuild-pdf=false"
+
+html-tutorial:
+ extends: .build-default
+ stage: build
+ variables:
+ FEDORA_DEPS:
+ gcc
+ gcc-c++
+ libxslt
+ ninja-build
+ python3
+ python3-pip
+ python3-wheel
+ MESON_VERSION: "0.50.0"
+ MESON_OPTIONS: "-Dbuild-examples=false -Dvalidation=false -Dbuild-translations=false -Dbuild-pdf=false"
+ artifacts:
+ when: always
+ paths:
+ - _build/docs/tutorial
+
+pages:
+ stage: deploy
+ needs: ["html-tutorial"]
+ script:
+ - mkdir public
+ - mv _build/docs/tutorial public
+ only:
+ refs:
+ - master
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]