[gnomemm-website/kjellahl/testci] CI: Update for DocBook 5



commit 823f05233794fa03d9f544008296bdb73f408095
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Mon Jan 24 15:30:17 2022 +0100

    CI: Update for DocBook 5

 .gitlab-ci.yml | 50 +++++++++++++++++++++++++++++++++-----------------
 1 file changed, 33 insertions(+), 17 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a482517..858f8e6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,29 +3,44 @@
 image: ubuntu:rolling
 
 stages:
+  - validate
   - build
   - deploy
 
+variables:
+  # If docbook-xsl-ns is installed, the xsltproc command reads
+  # stylesheets from local files instead of http://docbook.sourceforge.net.
+  # Faster and safer. Reading from docbook.sourceforge.net sometimes fails.
+  DEPENDENCIES:
+    meson
+    ninja-build
+    python3-setuptools
+    yelp-tools
+    gettext
+    itstool
+    libxml2-utils
+    xsltproc
+    docbook5-xml
+    docbook-xsl-ns
+
+.build_default:
+  before_script:
+    - export DEBIAN_FRONTEND=noninteractive
+    - apt update && apt -y upgrade && apt -y install $DEPENDENCIES
+
+website_validate:
+  extends: .build_default
+  stage: validate
+  script:
+    - mkdir _build && cd _build
+    - meson --prefix=/usr -Dvalidation=true -Dbuild-translations=false -Dallow-network-access=false
+    - meson compile
+  allow_failure: true
+
 website_build:
+  extends: .build_default
   stage: build
-  variables:
-    # If docbook-xsl is installed, the xsltproc command reads
-    # stylesheets from local files instead of http://docbook.sourceforge.net.
-    # Faster and safer. Reading from docbook.sourceforge.net sometimes fails.
-    DEPENDENCIES:
-      meson
-      ninja-build
-      python3-setuptools
-      yelp-tools
-      gettext
-      itstool
-      libxml2-utils
-      xsltproc
-      docbook-xml
-      docbook-xsl
   script:
-    - export DEBIAN_FRONTEND=noninteractive
-    - apt update && apt -y upgrade && apt -y install $DEPENDENCIES
     - mkdir _build && cd _build
     - meson --prefix=/usr
     - meson compile
@@ -36,6 +51,7 @@ website_build:
 # Publish the gtkmm website at gnome.pages.gitlab.gnome.org/gnomemm-website
 pages:
   stage: deploy
+  needs: ["website_build"]
   script:
     - mkdir public
     - mv _build/docs/html/.htaccess _build/docs/html/* public


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]