[gtk/wip/nirbheek/gtk-3-24-meson] CI: add meson build jobs for Fedora and MSYS2



commit 46f813e67ddc4e15e922f99c41f2dff9f2ce778b
Author: Christoph Reiter <creiter src gnome org>
Date:   Fri Mar 22 10:57:33 2019 +0100

    CI: add meson build jobs for Fedora and MSYS2

 .gitlab-ci.yml                                     | 26 ++++++++++---
 .gitlab-ci/Dockerfile                              |  9 ++++-
 .gitlab-ci/run-docker.sh                           |  2 +-
 .../{test-docker.sh => test-docker-autotools.sh}   |  0
 .gitlab-ci/test-docker-meson.sh                    | 13 +++++++
 .../{test-msys2.sh => test-msys2-autotools.sh}     |  1 -
 .gitlab-ci/test-msys2-meson.sh                     | 44 ++++++++++++++++++++++
 7 files changed, 86 insertions(+), 9 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fe678aa2ea..ac8a628ab0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -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"
diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile
index a635411ad5..6258a39602 100644
--- a/.gitlab-ci/Dockerfile
+++ b/.gitlab-ci/Dockerfile
@@ -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}
diff --git a/.gitlab-ci/run-docker.sh b/.gitlab-ci/run-docker.sh
index bd9ddeef05..789284130f 100755
--- a/.gitlab-ci/run-docker.sh
+++ b/.gitlab-ci/run-docker.sh
@@ -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
diff --git a/.gitlab-ci/test-docker.sh b/.gitlab-ci/test-docker-autotools.sh
similarity index 100%
rename from .gitlab-ci/test-docker.sh
rename to .gitlab-ci/test-docker-autotools.sh
diff --git a/.gitlab-ci/test-docker-meson.sh b/.gitlab-ci/test-docker-meson.sh
new file mode 100755
index 0000000000..c3cbdf56a1
--- /dev/null
+++ b/.gitlab-ci/test-docker-meson.sh
@@ -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
diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2-autotools.sh
similarity index 99%
rename from .gitlab-ci/test-msys2.sh
rename to .gitlab-ci/test-msys2-autotools.sh
index 393d15c685..656bac26bd 100644
--- a/.gitlab-ci/test-msys2.sh
+++ b/.gitlab-ci/test-msys2-autotools.sh
@@ -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 \
diff --git a/.gitlab-ci/test-msys2-meson.sh b/.gitlab-ci/test-msys2-meson.sh
new file mode 100644
index 0000000000..2759c0b417
--- /dev/null
+++ b/.gitlab-ci/test-msys2-meson.sh
@@ -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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]