[gobject-introspection: 1/3] CI: add two jobs building a project using g-i with meson and autotools



commit a0b335a8b22247ef389a59d2c87d1ff09961e481
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Tue May 19 09:04:12 2020 +0200

    CI: add two jobs building a project using g-i with meson and autotools
    
    This tests that after installing the g-i tools a simple project using
    them can be build with meson and autotools.
    
    Fixes #341

 .gitlab-ci.yml           | 30 +++++++++++++++++++++++++++++-
 .gitlab-ci/Dockerfile    |  2 ++
 .gitlab-ci/run-docker.sh |  2 +-
 3 files changed, 32 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0cb71530..18e49f5a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,12 +2,40 @@ stages:
   - build
   - deploy
 
-image: registry.gitlab.gnome.org/gnome/gobject-introspection:v6
+image: registry.gitlab.gnome.org/gnome/gobject-introspection:v7
 
 cache:
   paths:
     - _ccache/
 
+example-meson:
+  stage: build
+  script:
+    - python3 -m pip install --user mako markdown
+    - meson --prefix /usr --libdir /usr/lib64 --buildtype debug -Ddoctool=enabled -Dgtk_doc=true 
-Dcairo=enabled -Dpython=python3 _build .
+    - ninja -C _build
+    - sudo ninja -C _build install
+    - g-ir-scanner --version
+    - cd examples/library
+    - meson --prefix /usr --default-library both _build
+    - ninja -C _build
+    - sudo ninja -C _build install
+    - g-ir-inspect --print-typelibs --print-shlibs GISample
+
+example-autotools:
+  stage: build
+  script:
+    - python3 -m pip install --user mako markdown
+    - meson --prefix /usr --libdir /usr/lib64 --buildtype debug -Ddoctool=enabled -Dgtk_doc=true 
-Dcairo=enabled -Dpython=python3 _build .
+    - ninja -C _build
+    - sudo ninja -C _build install
+    - g-ir-scanner --version
+    - cd examples/library
+    - ./autogen.sh --prefix /usr
+    - make -j
+    - sudo make install
+    - g-ir-inspect --print-typelibs --print-shlibs GISample
+
 fedora-x86_64-meson:
   stage: build
   variables:
diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile
index 0dec6700..3a579cf8 100644
--- a/.gitlab-ci/Dockerfile
+++ b/.gitlab-ci/Dockerfile
@@ -43,6 +43,7 @@ RUN dnf -y install \
     python3-wheel \
     readline-devel \
     redhat-rpm-config \
+    sudo \
     sqlite-devel \
     systemtap-sdt-devel \
     zlib-devel \
@@ -53,6 +54,7 @@ RUN pip3 install meson==0.50.1
 ARG HOST_USER_ID=5555
 ENV HOST_USER_ID ${HOST_USER_ID}
 RUN useradd -u $HOST_USER_ID -ms /bin/bash user
+RUN echo 'user ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
 
 USER user
 WORKDIR /home/user
diff --git a/.gitlab-ci/run-docker.sh b/.gitlab-ci/run-docker.sh
index 5d29002c..8e6a04ab 100755
--- a/.gitlab-ci/run-docker.sh
+++ b/.gitlab-ci/run-docker.sh
@@ -2,7 +2,7 @@
 
 set -e
 
-TAG="registry.gitlab.gnome.org/gnome/gobject-introspection:v6"
+TAG="registry.gitlab.gnome.org/gnome/gobject-introspection:v7"
 
 sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
     --file "Dockerfile" .


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