[gtkmm-documentation/ebassi/ci-publish] Add a CI pipeline for building, validating, and publishing




commit 03eb67ab40f9fb84801a3f570d385acea8caab7f
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 | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..6383931
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,57 @@
+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:
+      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:
+      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]