gitlab-ci: add native Windows 32-bit build with MSYS2.

Note: Vala API doesn't build well on the 32-bit build. Not sure why (the
meson logs for GObject Introspection build are just as empty as ever),
but it won't generate the VAPI. So I disabled the option on 32-bit.
This commit is contained in:
Jehan 2021-05-08 15:05:35 +02:00
parent 1284bbf679
commit a04eff326f
3 changed files with 71 additions and 4 deletions

View file

@ -237,11 +237,61 @@ gimp-win64-native:
expire_in: 1 day
paths:
- _install
- _build
cache:
paths:
- _ccache/
needs: ["deps-win64-native"]
## WINDOWS 32-bit CI (native MSYS2) ##
deps-win32-native:
rules:
- if: '$CI_COMMIT_TAG == null && $CI_PIPELINE_SOURCE != "schedule"'
stage: dependencies
variables:
MSYSTEM: "MINGW32"
CHERE_INVOKING: "yes"
tags:
- win32-ps
cache:
paths:
- _install/
script:
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu
- C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/build-deps-msys2.sh"
artifacts:
name: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"
when: always
expire_in: 2 hours
paths:
- _install
needs: []
gimp-win32-native:
rules:
- if: '$CI_COMMIT_TAG == null && $CI_PIPELINE_SOURCE != "schedule"'
stage: gimp
variables:
MSYSTEM: "MINGW32"
CHERE_INVOKING: "yes"
tags:
- win32-ps
script:
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu
- C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/build-gimp-msys2.sh"
artifacts:
name: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"
when: always
expire_in: 1 day
paths:
- _install
- _build
cache:
paths:
- _ccache/
needs: ["deps-win32-native"]
## WINDOWS 64-bit CI (cross-build crossroad) ##
deps-win64:

View file

@ -4,8 +4,14 @@ set -e
if [[ "$MSYSTEM" == "MINGW32" ]]; then
export MSYS2_ARCH="i686"
# vapi build fails on 32-bit, with no error output. Let's just drop
# it for this architecture.
export BABL_OPTIONS="-Denable-vapi=false"
export GEGL_OPTIONS="-Dvapigen=disabled"
else
export MSYS2_ARCH="x86_64"
export BABL_OPTIONS=""
export GEGL_OPTIONS=""
fi
# Why do we even have to remove these manually? The whole thing is
@ -59,7 +65,8 @@ git clone --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/gegl.git _gegl
mkdir _babl/_build
cd _babl/_build
meson -Dprefix="${GIMP_PREFIX}" -Dwith-docs=false ..
meson -Dprefix="${GIMP_PREFIX}" -Dwith-docs=false \
${BABL_OPTIONS} ..
ninja
ninja install
@ -67,6 +74,7 @@ mkdir ../../_gegl/_build
cd ../../_gegl/_build
meson -Dprefix="${GIMP_PREFIX}" -Ddocs=false \
-Dcairo=enabled -Dumfpack=enabled \
-Dopenexr=enabled -Dworkshop=true ..
-Dopenexr=enabled -Dworkshop=true \
${GEGL_OPTIONS} ..
ninja
ninja install

View file

@ -4,8 +4,14 @@ set -e
if [[ "$MSYSTEM" == "MINGW32" ]]; then
export MSYS2_ARCH="i686"
export ACLOCAL_FLAGS="-I/c/msys64/mingw32/share/aclocal"
export PATH="/c/msys64/mingw32/bin:$PATH"
export GIMP_OPTIONS="--with-vala=no --enable-vala=no"
else
export MSYS2_ARCH="x86_64"
export ACLOCAL_FLAGS="-I/c/msys64/mingw64/share/aclocal"
export PATH="/c/msys64/mingw64/bin:$PATH"
export GIMP_OPTIONS=""
fi
# Why do we even have to remove these manually? The whole thing is
@ -79,7 +85,7 @@ export PATH="$GIMP_PREFIX/bin:$PATH"
export PKG_CONFIG_PATH="${GIMP_PREFIX}/lib/pkgconfig:$PKG_CONFIG_PATH"
export PKG_CONFIG_PATH="${GIMP_PREFIX}/share/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="${GIMP_PREFIX}/lib:${LD_LIBRARY_PATH}"
export ACLOCAL_FLAGS="-I/c/msys64/mingw64/share/aclocal"
export ACLOCAL_FLAGS="-I/c/msys64/mingw32/share/aclocal"
export XDG_DATA_DIRS="${GIMP_PREFIX}/share:/mingw64/share/"
mkdir -p _ccache
@ -90,9 +96,12 @@ export CC="ccache gcc"
ccache --zero-stats
ccache --show-stats
./autogen.sh --prefix="${GIMP_PREFIX}"
mkdir _build
cd _build
../autogen.sh --prefix="${GIMP_PREFIX}" ${GIMP_OPTIONS}
make -j4
make install
cd ..
ccache --show-stats