[gtk: 1/2] Add gitlab-ci support using a prebuilt docker image
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] Add gitlab-ci support using a prebuilt docker image
- Date: Wed, 14 Feb 2018 23:39:53 +0000 (UTC)
commit dfc1f76be73ffced0552f056dfb01deedde3d95e
Author: Christoph Reiter <creiter src gnome org>
Date: Tue Feb 13 17:21:18 2018 +0100
Add gitlab-ci support using a prebuilt docker image
.gitlab-ci.yml | 18 ++++++++++++++++
.gitlab-ci/Dockerfile | 52 +++++++++++++++++++++++++++++++++++++++++++++++
.gitlab-ci/run-docker.sh | 9 ++++++++
.gitlab-ci/test-docker.sh | 9 ++++++++
4 files changed, 88 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000..4bc0cb07fe
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,18 @@
+image: lazka/gitlab-gtk:v1
+
+stages:
+ - build
+
+before_script:
+ - mkdir -p _ccache
+ - export CCACHE_BASEDIR=${PWD}
+ - export CCACHE_DIR=${PWD}/_ccache
+
+cache:
+ paths:
+ - _ccache/
+
+build:
+ stage: build
+ script:
+ - bash -x ./.gitlab-ci/test-docker.sh
diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile
new file mode 100644
index 0000000000..e710be0658
--- /dev/null
+++ b/.gitlab-ci/Dockerfile
@@ -0,0 +1,52 @@
+FROM fedora:27
+
+RUN dnf -y install \
+ atk-devel \
+ at-spi2-atk-devel \
+ avahi-gobject-devel \
+ cairo-devel \
+ cairo-gobject-devel \
+ ccache \
+ colord-devel \
+ cups-devel \
+ fribidi-devel \
+ gcc \
+ gcc-c++ \
+ gdk-pixbuf2-devel \
+ gettext \
+ git \
+ glib2-devel \
+ gobject-introspection-devel \
+ graphene-devel \
+ itstool \
+ json-glib-devel \
+ libepoxy-devel \
+ libmount-devel \
+ libXcomposite-devel \
+ libXcursor-devel \
+ libXcursor-devel \
+ libXdamage-devel \
+ libXfixes-devel \
+ libXi-devel \
+ libXinerama-devel \
+ libxkbcommon-devel \
+ libXrandr-devel \
+ libXrender-devel \
+ mesa-libEGL-devel \
+ mesa-libwayland-egl-devel \
+ meson \
+ pango-devel \
+ redhat-rpm-config \
+ vulkan-devel \
+ wayland-devel \
+ wayland-protocols-devel \
+ xorg-x11-server-Xvfb
+
+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 0000000000..9568cab8a0
--- /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-gtk" \
+ --file "Dockerfile" .
+sudo docker run --rm \
+ --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
+ --tty --interactive "gitlab-gtk" bash
diff --git a/.gitlab-ci/test-docker.sh b/.gitlab-ci/test-docker.sh
new file mode 100755
index 0000000000..bddc7aa47a
--- /dev/null
+++ b/.gitlab-ci/test-docker.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+set -e
+
+pwd
+meson -Denable-x11-backend=true -Denable-wayland-backend=true \
+ -Denable-broadway-backend=true -Denable-vulkan=yes _build_full
+cd _build_full
+ninja
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]