[gobject-introspection] CI: add a job that builds glib as a subproject



commit fde50458dd9e7ea209d486ae315799eb9dc4ec36
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Thu Nov 14 18:24:14 2019 +0100

    CI: add a job that builds glib as a subproject
    
    In our case we have to do various special things in case glib isn't available
    through pkg-config and not all tests are run.
    
    Add a CI job that tests this case so we don't regress.

 .gitlab-ci.yml                   | 20 ++++++++++++++++++++
 .gitlab-ci/minimal.Dockerfile    | 27 +++++++++++++++++++++++++++
 .gitlab-ci/run-docker-minimal.sh | 11 +++++++++++
 3 files changed, 58 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9e62b41a..16a8f3bb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -35,6 +35,26 @@ fedora-x86_64-meson:
       - "${CI_PROJECT_DIR}/_build/meson-logs"
       - public
 
+fedora-x86_64-subprojects:
+  image: registry.gitlab.gnome.org/gnome/gobject-introspection:min-v1
+  stage: build
+  variables:
+    CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
+    CCACHE_DIR: "${CI_PROJECT_DIR}/_ccache"
+  script:
+    - meson _build .
+    - cd _build
+    - ninja
+    - meson test --print-errorlogs --suite=gobject-introspection
+  except:
+    - tags
+  artifacts:
+    when: always
+    name: "gi-_${CI_COMMIT_REF_NAME}"
+    paths:
+      - "${CI_PROJECT_DIR}/_build/meson-logs"
+      - public
+
 fedora-x86_64-python3.5:
   stage: build
   variables:
diff --git a/.gitlab-ci/minimal.Dockerfile b/.gitlab-ci/minimal.Dockerfile
new file mode 100644
index 00000000..b33aa64b
--- /dev/null
+++ b/.gitlab-ci/minimal.Dockerfile
@@ -0,0 +1,27 @@
+FROM fedora:29
+
+RUN dnf -y install \
+    flex \
+    bison \
+    gcc \
+    gcc-c++ \
+    git \
+    ninja-build \
+    pkgconf \
+    python3 \
+    python3-devel \
+    python3-pip \
+    python3-wheel \
+    libmount-devel \
+ && dnf clean all
+
+RUN pip3 install meson==0.52.0
+
+ARG HOST_USER_ID=5555
+ENV HOST_USER_ID ${HOST_USER_ID}
+RUN useradd -u $HOST_USER_ID -ms /bin/bash user
+
+USER user
+WORKDIR /home/user
+
+ENV LANG C.UTF-8
diff --git a/.gitlab-ci/run-docker-minimal.sh b/.gitlab-ci/run-docker-minimal.sh
new file mode 100755
index 00000000..36b2d376
--- /dev/null
+++ b/.gitlab-ci/run-docker-minimal.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -e
+
+TAG="registry.gitlab.gnome.org/gnome/gobject-introspection:min-v1"
+
+sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
+    --file "minimal.Dockerfile" .
+sudo docker run --rm \
+    --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
+    --tty --interactive "${TAG}" bash


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