CI: add meson build jobs for Fedora and MSYS2

This commit is contained in:
Christoph Reiter 2019-03-22 10:57:33 +01:00
parent b185f69334
commit dc5698ad55
7 changed files with 86 additions and 9 deletions

View File

@ -1,4 +1,4 @@
image: registry.gitlab.gnome.org/gnome/gtk/gtk-3-24:v1
image: registry.gitlab.gnome.org/gnome/gtk/gtk-3-24:v2
stages:
- build
@ -7,12 +7,28 @@ cache:
paths:
- _ccache/
build:
fedora-autotools:
stage: build
script:
- bash -x ./.gitlab-ci/test-docker.sh
- bash -x ./.gitlab-ci/test-docker-autotools.sh
msys2-mingw32:
fedora-meson:
stage: build
script:
- bash -x ./.gitlab-ci/test-docker-meson.sh
msys2-mingw32-meson:
variables:
MSYSTEM: "MINGW32"
CHERE_INVOKING: "yes"
stage: build
tags:
- win32
script:
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2-meson.sh"
msys2-mingw32-autotools:
when: manual
variables:
MSYSTEM: "MINGW32"
@ -22,4 +38,4 @@ msys2-mingw32:
- win32
script:
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2-autotools.sh"

View File

@ -1,4 +1,4 @@
FROM fedora:28
FROM fedora:29
RUN dnf -y install \
adwaita-icon-theme \
@ -42,12 +42,17 @@ RUN dnf -y install \
mesa-libEGL-devel \
mesa-libwayland-egl-devel \
meson \
ninja-build \
pango-devel \
python3 \
python3-pip \
python3-wheel \
redhat-rpm-config \
vulkan-devel \
wayland-devel \
wayland-protocols-devel \
xorg-x11-server-Xvfb
xorg-x11-server-Xvfb \
&& dnf clean all
ARG HOST_USER_ID=5555
ENV HOST_USER_ID ${HOST_USER_ID}

View File

@ -8,7 +8,7 @@
set -e
TAG="registry.gitlab.gnome.org/gnome/gtk/gtk-3-24:v1"
TAG="registry.gitlab.gnome.org/gnome/gtk/gtk-3-24:v2"
# HOST_USER_ID gets used to create a user with the same ID so that files
# created in the mounted volume have the same owner

13
.gitlab-ci/test-docker-meson.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
set -e
mkdir -p _ccache
export CCACHE_BASEDIR="$(pwd)"
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
export PATH="${HOME}/.local/bin:${PATH}"
python3 -m pip install --user meson==0.49.2
meson _build
ninja -C _build

View File

@ -14,7 +14,6 @@ pacman --noconfirm -Suy
# Install the required packages
pacman --noconfirm -S --needed \
base-devel \
git \
mingw-w64-$MSYS2_ARCH-toolchain \
mingw-w64-$MSYS2_ARCH-ccache \
mingw-w64-$MSYS2_ARCH-pkg-config \

View File

@ -0,0 +1,44 @@
#!/bin/bash
set -e
if [[ "$MSYSTEM" == "MINGW32" ]]; then
export MSYS2_ARCH="i686"
else
export MSYS2_ARCH="x86_64"
fi
# Update everything
pacman --noconfirm -Suy
# Install the required packages
pacman --noconfirm -S --needed \
mingw-w64-$MSYS2_ARCH-toolchain \
mingw-w64-$MSYS2_ARCH-ccache \
mingw-w64-$MSYS2_ARCH-pkg-config \
mingw-w64-$MSYS2_ARCH-gobject-introspection \
mingw-w64-$MSYS2_ARCH-adwaita-icon-theme \
mingw-w64-$MSYS2_ARCH-atk \
mingw-w64-$MSYS2_ARCH-cairo \
mingw-w64-$MSYS2_ARCH-gdk-pixbuf2 \
mingw-w64-$MSYS2_ARCH-glib2 \
mingw-w64-$MSYS2_ARCH-json-glib \
mingw-w64-$MSYS2_ARCH-libepoxy \
mingw-w64-$MSYS2_ARCH-pango \
mingw-w64-$MSYS2_ARCH-shared-mime-info \
mingw-w64-$MSYS2_ARCH-meson \
mingw-w64-$MSYS2_ARCH-ninja \
mingw-w64-$MSYS2_ARCH-gtk-doc
mkdir -p _ccache
export CCACHE_BASEDIR="$(pwd)"
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
# Build
ccache --zero-stats
ccache --show-stats
meson _build
ninja -C _build
ccache --show-stats