[gobject-introspection/wip/ci] Add CI environment for gobject-introspection
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection/wip/ci] Add CI environment for gobject-introspection
- Date: Sat, 10 Mar 2018 14:20:30 +0000 (UTC)
commit e7184e799d020d28e7fd61a8d23d1d1a178db30f
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sat Mar 10 14:19:08 2018 +0000
Add CI environment for gobject-introspection
Based on the GLib and GTK equivalent CI environment, with a Docker
container used to run the build.
.gitlab-ci.yml | 19 +++++++++++++++++++
.gitlab-ci/Dockerfile | 20 ++++++++++++++++++++
.gitlab-ci/run-docker.sh | 9 +++++++++
3 files changed, 48 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00000000..5f598b9b
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,19 @@
+image: ebassi/gitlab-gi:latest
+
+stages:
+ - build
+
+build-job:
+ stage: build
+ script:
+ - meson --prefix /usr --libdir /usr/lib64 --buildtype debug --werror -Dcairo=true _build .
+ - cd _build
+ - ninja
+ - meson test
+ except:
+ - tags
+ artifacts:
+ when: on_failure
+ name: "glib-_${CI_COMMIT_REF_NAME}"
+ paths:
+ - "${CI_PROJECT_DIR}/_build/meson-logs"
diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile
new file mode 100644
index 00000000..9a2fa757
--- /dev/null
+++ b/.gitlab-ci/Dockerfile
@@ -0,0 +1,20 @@
+FROM fedora:27
+
+RUN dnf -y install \
+ cairo-devel \
+ cairo-gobject-devel \
+ gcc \
+ gcc-c++ \
+ glib-devel \
+ itstool \
+ libffi-devel \
+ meson
+
+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.utf8
diff --git a/.gitlab-ci/run-docker.sh b/.gitlab-ci/run-docker.sh
new file mode 100755
index 00000000..91694fb3
--- /dev/null
+++ b/.gitlab-ci/run-docker.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+set -e
+
+sudo docker build --build-arg HOST_USER_ID="$UID" --tag "gitlab-gi" \
+ --file "Dockerfile" .
+sudo docker run --rm \
+ --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
+ --tty --interactive "gitlab-gi" bash
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]