Commit d65cdd42 authored by Emmanuele Bassi's avatar Emmanuele Bassi

Add CI infrastructure for Clutter

We should use GitLab's CI runner and Docker registry to build Clutter
and test it.
parent 8857547b
stages:
- build
.cache-paths: &cache-paths
paths:
- _ccache/
meson-fedora-x86_64:
image: registry.gitlab.gnome.org/gnome/clutter/master:v1
stage: build
script:
- bash -x ./.gitlab-ci/test-docker.sh
artifacts:
when: on_failure
name: "clutter-${CI_COMMIT_REF_NAME}"
paths:
- "${CI_PROJECT_DIR}/_build/meson-logs"
cache:
key: "$CI_JOB_NAME"
<<: *cache-paths
FROM fedora:28
RUN dnf -y install \
adwaita-icon-theme \
atk-devel \
at-spi2-atk-devel \
cairo-devel \
cairo-gobject-devel \
ccache \
cogl-devel \
desktop-file-utils \
elfutils-libelf-devel \
fribidi-devel \
gcc \
gcc-c++ \
gdk-pixbuf2-devel \
gdk-pixbuf2-modules \
gettext \
git \
glib2-devel \
glibc-devel \
glibc-headers \
gobject-introspection-devel \
gtk-doc \
gtk3-devel \
itstool \
json-glib-devel \
libffi-devel \
libgudev-devel \
libinput-devel \
librsvg2 \
libXcomposite-devel \
libXcursor-devel \
libXcursor-devel \
libXdamage-devel \
libXfixes-devel \
libXi-devel \
libXinerama-devel \
libxkbcommon-devel \
libXrandr-devel \
libXrender-devel \
libxslt \
mesa-dri-drivers \
mesa-libEGL-devel \
mesa-libwayland-egl-devel \
ninja-build \
pango-devel \
pcre-devel \
python3 \
python3-pip \
python3-wheel \
redhat-rpm-config \
systemd-devel \
wayland-devel \
wayland-protocols-devel \
which \
xorg-x11-server-Xvfb \
&& dnf clean all
RUN pip3 install 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.UTF-8
#!/bin/bash
set -e
TAG="registry.gitlab.gnome.org/gnome/clutter/master:v1"
sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
--file "Dockerfile" .
sudo docker run --rm --security-opt label=disable \
--volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
--tty --interactive "${TAG}" bash
#!/bin/bash
set -e
srcdir=$(pwd)
mkdir -p _ccache
export CCACHE_BASEDIR="$(pwd)"
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
ccache --zero-stats
ccache --show-stats
export CCACHE_DISABLE=true
meson \
-Dbackends=x11,gdk,eglnative,wayland \
-Ddocumentation=true \
_build $srcdir
unset CCACHE_DISABLE
cd _build
ninja
ccache --show-stats
xvfb-run -a -s "-screen 0 1024x768x24" \
meson test \
--print-errorlogs
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment