[libpeas] Add simple CI for build + docs publishing



commit 2420cccb2cc2963084eb55ce23c2d2aa0f79a243
Author: Martin Blanchard <tchaik gmx com>
Date:   Sun Aug 19 19:26:55 2018 +0100

    Add simple CI for build + docs publishing
    
    Publish documentation on GitLab pages as meson does not embed generated
    documentation in distribution tarballs. Pages URL:
    
        https://gnome.pages.gitlab.gnome.org/libpeas/libpeas
    
    https://bugzilla.gnome.org/show_bug.cgi?id=793916
    https://gitlab.gnome.org/GNOME/libpeas/issues/26

 .gitlab-ci.yml | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 62 insertions(+), 9 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1071182..8fe66ad 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,14 +1,67 @@
 stages:
-- test
+  - 'build'
+  - 'deploy'
 
-build-fedora:
-  image: fedora:latest
-  stage: test
+.build:
+  image: 'registry.fedoraproject.org/fedora:30'
+  stage: 'build'
+  variables:
+    CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
+    CCACHE_DIR: "${CCACHE_BASEDIR}/_ccache"
+    DEPS: >-
+      gcc
+      ccache
+      gettext
+      gtk-doc
+      meson
+      ninja-build
+      redhat-rpm-config
+      glib2-devel
+      gtk3-devel
+      gobject-introspection-devel
+      python2-devel
+      python3-devel
+      xorg-x11-server-Xvfb
   before_script:
-    - dnf install -y gcc redhat-rpm-config which intltool gtk-doc gnome-common make gtk3-devel glade-devel 
gobject-introspection-devel pygobject3-devel python3-devel xorg-x11-server-Xvfb
+    - "dnf install -y $DEPS"
+    - 'mkdir -p _ccache'
+    - 'ccache --zero-stats'
+    - 'ccache --show-stats'
+  after_script:
+    - 'ccache --show-stats'
+  cache:
+    key: "$CI_JOB_NAME"
+    paths:
+      - '_ccache/'
+
+build peas:
+  extends: '.build'
+  script:
+    - 'meson -Dwidgetry=false -Dintrospection=true -Dvapi=true -Ddemos=false _build .'
+    - 'ninja -C _build test'
+
+build peas-gtk:
+  extends: '.build'
   script:
-    - ./autogen.sh --disable-dependency-tracking
-    - make
-    - make install
-    - G_MESSAGES_DEBUG=all xvfb-run -a -s "-screen 0 1024x768x24" make check
+    - 'meson -Dwidgetry=true -Dglade_catalog=true -Dintrospection=true -Dvapi=true -Dgtk_doc=true _build .'
+    - 'xvfb-run -a -s "-screen 0 1024x768x24"  ninja -C _build test'
+    - 'ninja -C _build libpeas-doc'
+  artifacts:
+    name: 'libpeas-doc'
+    paths:
+      - '_build/docs/reference/html'
 
+pages:
+  image: 'registry.fedoraproject.org/fedora:30'
+  stage: 'deploy'
+  dependencies:
+    - 'build peas'
+    - 'build peas-gtk'
+  script:
+    - 'mkdir -p public/'
+    - 'mv _build/docs/reference/html/ public/libpeas/'
+  artifacts:
+    paths:
+      - 'public'
+  only:
+    - 'master'


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