diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 35d347411..75b2aed31 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,7 +11,7 @@ variables: UPSTREAM_REPO: xorg/xserver FDO_DISTRIBUTION_VERSION: buster-slim FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/debian-install.sh' - FDO_DISTRIBUTION_TAG: "2021-01-19-git" + FDO_DISTRIBUTION_TAG: "2021-04-06" include: - project: 'freedesktop/ci-templates' @@ -83,3 +83,9 @@ meson-noglamor: variables: MESON_EXTRA_OPTIONS: > -Dglamor=false + +mingw-cross-build: + extends: .common-build-and-test + script: + - meson --cross-file=.gitlab-ci/cross-i686-w64-mingw32.txt -Dglx=false -Dsecure-rpc=false -Dlisten_tcp=true build/ + - ninja -j${FDO_CI_CONCURRENT:-4} -C build/ install diff --git a/.gitlab-ci/cross-i686-w64-mingw32.txt b/.gitlab-ci/cross-i686-w64-mingw32.txt new file mode 100644 index 000000000..1c04f6547 --- /dev/null +++ b/.gitlab-ci/cross-i686-w64-mingw32.txt @@ -0,0 +1,20 @@ +[binaries] +c = 'i686-w64-mingw32-gcc' +cpp = 'i686-w64-mingw32-g++' +ar = 'i686-w64-mingw32-ar' +strip = 'i686-w64-mingw32-strip' +pkgconfig = '/usr/local/bin/i686-w64-mingw32-pkg-config' +windres = 'i686-w64-mingw32-windres' +exe_wrapper = 'wine' + +[properties] +# Directory that contains 'bin', 'lib', etc for the toolchain +root = '/usr/i686-w64-mingw32' +# Directory that contains 'bin', 'lib', etc which have been cross-compiled +sys_root = '/usr/i686-w64-mingw32' + +[host_machine] +system = 'windows' +cpu_family = 'x86' +cpu = 'i686' +endian = 'little' diff --git a/.gitlab-ci/cross-prereqs-build.sh b/.gitlab-ci/cross-prereqs-build.sh new file mode 100755 index 000000000..3decf707b --- /dev/null +++ b/.gitlab-ci/cross-prereqs-build.sh @@ -0,0 +1,79 @@ +#!/bin/bash + +set -e +set -o xtrace + +HOST=$1 + +# Debian's cross-pkg-config wrappers are broken for MinGW targets, since +# dpkg-architecture doesn't know about MinGW target triplets. +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930492 +cat >/usr/local/bin/${HOST}-pkg-config <= 1.18