[gimp/wip/Jehan/native-win64-build] gitlab-ci: testing native Windows build.




commit 87597b0c0e5b12699b53e9b83ce0e9ee4c1eb0d5
Author: Jehan <jehan girinstud io>
Date:   Sun May 2 15:43:25 2021 +0200

    gitlab-ci: testing native Windows build.
    
    Just an initial test to get a hang of the thing, mostly copied from GTK
    gitlab-ci rules with added commands.
    
    All in one job (deps, GIMP itself, etc.) for now, for test simplicity.

 .gitlab-ci.yml               | 12 +++++++
 build/windows/build-msys2.sh | 79 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 91 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6e2863e4c3..61db2d5bf3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -186,6 +186,18 @@ gimp-clang-debian:
 
 ## WINDOWS 64-bit CI ##
 
+deps-native-win64:
+  variables:
+    MSYSTEM: "MINGW64"
+    CHERE_INVOKING: "yes"
+  stage: dependencies
+  tags:
+    - win32-ps
+  script:
+    - C:\msys64\usr\bin\pacman --noconfirm -Syyuu
+    - C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/build-msys2.sh"
+  needs: []
+
 deps-win64:
   rules:
     - if: '$CI_COMMIT_TAG == null'
diff --git a/build/windows/build-msys2.sh b/build/windows/build-msys2.sh
new file mode 100644
index 0000000000..c357dd0dcf
--- /dev/null
+++ b/build/windows/build-msys2.sh
@@ -0,0 +1,79 @@
+#!/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 \
+    mingw-w64-$MSYS2_ARCH-toolchain \
+    mingw-w64-$MSYS2_ARCH-ccache \
+    mingw-w64-$MSYS2_ARCH-pkg-config \
+    mingw-w64-$MSYS2_ARCH-meson \
+    mingw-w64-$MSYS2_ARCH-appstream-glib \
+    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-drmingw \
+    mingw-w64-$MSYS2_ARCH-gexiv2 \
+    mingw-w64-$MSYS2_ARCH-glib-networking \
+    mingw-w64-$MSYS2_ARCH-json-glib \
+    mingw-w64-$MSYS2_ARCH-libarchive \
+    mingw-w64-$MSYS2_ARCH-libepoxy \
+    mingw-w64-$MSYS2_ARCH-libmypaint \
+    mingw-w64-$MSYS2_ARCH-mypaint-brushes \
+    mingw-w64-$MSYS2_ARCH-pango \
+    mingw-w64-$MSYS2_ARCH-poppler \
+    mingw-w64-$MSYS2_ARCH-python3-gobject \
+    mingw-w64-$MSYS2_ARCH-shared-mime-info \
+    mingw-w64-$MSYS2_ARCH-gtk-doc \
+    mingw-w64-$MSYS2_ARCH-gtk3 \
+    mingw-w64-$MSYS2_ARCH-vala \
+    mingw-w64-$MSYS2_ARCH-luajit
+
+mkdir -p _ccache
+export CCACHE_BASEDIR="$(pwd)"
+export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
+export CC="ccache gcc"
+
+export GIT_DEPTH=1
+export GIMP_PREFIX=`realpath ~/_install`
+export PATH="$GIMP_PREFIX/bin:$PATH"
+export PKG_CONFIG_PATH="${GIMP_PREFIX}/lib/pkgconfig"
+export PKG_CONFIG_PATH="${GIMP_PREFIX}/share/pkgconfig"
+export LD_LIBRARY_PATH="${GIMP_PREFIX}/lib:${LD_LIBRARY_PATH}"
+export XDG_DATA_DIRS="$XDG_DATA_DIRS:${GIMP_PREFIX}/share:/usr/local/share:/usr/share:/mingw64/share/"
+
+git clone --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/babl.git _babl
+git clone --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/gegl.git _gegl
+
+cd _babl
+meson -Dprefix="${GIMP_PREFIX}" _build
+ninja -C _build
+ninja -C _build install
+cd ../_gegl
+meson --prefix="${GIMP_PREFIX}" _build
+ninja -C _build
+ninja -C _build install
+cd ..
+
+# Build
+ccache --zero-stats
+ccache --show-stats
+
+./autogen.sh --prefix="${GIMP_PREFIX}"
+make -j4
+make install
+
+ccache --show-stats
+
+ls -ltr


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