mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 10:20:07 +00:00
Add gitlab-ci support using a prebuilt docker image
This commit is contained in:
parent
395550c671
commit
dfc1f76be7
18
.gitlab-ci.yml
Normal file
18
.gitlab-ci.yml
Normal file
@ -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
|
52
.gitlab-ci/Dockerfile
Normal file
52
.gitlab-ci/Dockerfile
Normal file
@ -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
|
9
.gitlab-ci/run-docker.sh
Executable file
9
.gitlab-ci/run-docker.sh
Executable file
@ -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
|
9
.gitlab-ci/test-docker.sh
Executable file
9
.gitlab-ci/test-docker.sh
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user