Add mingw64 cross build CI

Fixes #1387.
This commit is contained in:
Xavier Claessens 2018-05-20 15:17:48 -04:00
parent 707106c7a5
commit 3145d88f4b
5 changed files with 41 additions and 2 deletions

View File

@ -1,4 +1,4 @@
image: registry.gitlab.gnome.org/gnome/glib/master:v2
image: registry.gitlab.gnome.org/gnome/glib/master:v3
stages:
- build
@ -44,6 +44,18 @@ fedora-meson-android_ndk_r16_api21_arm64:
paths:
- "${CI_PROJECT_DIR}/_build/meson-logs"
fedora-meson-mingw64:
stage: build
except:
- tags
script:
# FIXME: Add --werror
- meson --cross-file=/opt/cross_file_mingw64.txt --buildtype debug _build
- ninja -C _build
artifacts:
paths:
- "${CI_PROJECT_DIR}/_build/meson-logs"
msys2-mingw32:
stage: build
tags:

View File

@ -28,6 +28,11 @@ RUN dnf -y install \
wget \
unzip \
make \
mingw64-gcc \
mingw64-gcc-c++ \
mingw64-gettext \
mingw64-zlib \
mingw64-libffi \
&& dnf clean all
RUN pip3 install meson
@ -35,6 +40,8 @@ RUN pip3 install meson
COPY setup-android-ndk.sh .
RUN ./setup-android-ndk.sh
COPY cross_file_mingw64.txt /opt
ARG HOST_USER_ID=5555
ENV HOST_USER_ID ${HOST_USER_ID}
RUN useradd -u $HOST_USER_ID -ms /bin/bash user

View File

@ -0,0 +1,17 @@
[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'
[properties]
c_args = []
c_link_args = []
[binaries]
c = 'x86_64-w64-mingw32-gcc'
cpp = 'x86_64-w64-mingw32-g++'
ar = 'x86_64-w64-mingw32-ar'
strip = 'x86_64-w64-mingw32-strip'
pkgconfig = 'x86_64-w64-mingw32-pkg-config'
windres = 'x86_64-w64-mingw32-windres'

View File

@ -61,7 +61,9 @@ IGNORE_HFILES = \
gtranslit-data.h \
glib-init.h \
gconstructor.h \
valgrind.h
valgrind.h \
gvalgrind.h \
$(NULL)
# Images to copy into HTML directory
HTML_IMAGES = \

View File

@ -34,6 +34,7 @@ if get_option('gtk_doc')
'glib-init.h',
'gconstructor.h',
'valgrind.h',
'gvalgrind.h',
]
ignore_decorators = [