[gtk/ci-msys2-gtk-3-24] ci: Add an optional Windows build job using autotools and MSYS2



commit 003dc26a575cee372104dae6c1814cea7c1db322
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Sat Sep 1 12:06:03 2018 +0200

    ci: Add an optional Windows build job using autotools and MSYS2
    
    Set to "manual" because it takes 40-60 minutes depending on the ccache hit rate.

 .gitlab-ci.yml            | 17 ++++++++++++-----
 .gitlab-ci/test-docker.sh |  4 ++++
 .gitlab-ci/test-msys2.sh  | 45 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 61 insertions(+), 5 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cdcd0bdb5b..fe678aa2ea 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,11 +3,6 @@ image: registry.gitlab.gnome.org/gnome/gtk/gtk-3-24:v1
 stages:
   - build
 
-before_script:
-  - mkdir -p _ccache
-  - export CCACHE_BASEDIR=${PWD}
-  - export CCACHE_DIR=${PWD}/_ccache
-
 cache:
   paths:
     - _ccache/
@@ -16,3 +11,15 @@ build:
   stage: build
   script:
    - bash -x ./.gitlab-ci/test-docker.sh
+
+msys2-mingw32:
+  when: manual
+  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.sh"
diff --git a/.gitlab-ci/test-docker.sh b/.gitlab-ci/test-docker.sh
index da7b4d5c10..523582e119 100755
--- a/.gitlab-ci/test-docker.sh
+++ b/.gitlab-ci/test-docker.sh
@@ -2,5 +2,9 @@
 
 set -e
 
+mkdir -p _ccache
+export CCACHE_BASEDIR="$(pwd)"
+export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
+
 ./autogen.sh
 make -j8
diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh
new file mode 100644
index 0000000000..393d15c685
--- /dev/null
+++ b/.gitlab-ci/test-msys2.sh
@@ -0,0 +1,45 @@
+#!/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 \
+    base-devel \
+    git \
+    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-gtk-doc
+
+mkdir -p _ccache
+export CCACHE_BASEDIR="$(pwd)"
+export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
+export CC="ccache gcc"
+
+# Build
+ccache --zero-stats
+ccache --show-stats
+
+./autogen.sh
+make -j4
+
+ccache --show-stats


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