ci/travis: add meson windows cross build

Summary:
catchup with the windows cross build autotools build we have and provide
the matching meson build.
Depends on D9042

Reviewers: bu5hm4n, zmike, vtorri

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9043
This commit is contained in:
Stefan Schmidt 2019-05-29 12:20:15 -04:00 committed by Mike Blumenkrantz
parent c84a5fce0b
commit 202c945bd3
3 changed files with 38 additions and 1 deletions

View File

@ -17,6 +17,11 @@ if [ "$BUILDSYSTEM" = "ninja" ] ; then
RELEASE_READY_LINUX_COPTS=" --buildtype=release"
MINGW_COPTS="--cross-file .ci/cross_toolchain.txt -Davahi=false -Deeze=false -Dsystemd=false \
-Dpulseaudio=false -Dx11=false -Dopengl=none -Dlibmount=false \
-Devas-loaders-disabler=pdf,ps,raw,svg -Devas-modules=static -Dbindings=luajit \
-Dbuild-examples=false -Dbuild-tests=false"
if [ "$1" = "options-enabled" ]; then
OPTS="$OPTS $ENABLED_LINUX_COPTS $WAYLAND_LINUX_COPTS"
fi
@ -32,9 +37,19 @@ if [ "$BUILDSYSTEM" = "ninja" ] ; then
if [ "$1" = "release-ready" ]; then
OPTS="$OPTS $RELEASE_READY_LINUX_COPTS"
fi
docker exec --env MAKEFLAGS="-j5 -rR" --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \
if [ "$1" = "mingw" ]; then
OPTS="$OPTS $MINGW_COPTS"
docker exec $(cat $HOME/cid) sh -c '.ci/bootstrap-efl-native-for-cross.sh'
fi
if [ "$1" = "mingw" ]; then
docker exec --env MAKEFLAGS="-j5 -rR" --env EIO_MONITOR_POLL=1 --env PKG_CONFIG_PATH="/ewpi-64-install/lib/pkgconfig/" \
$(cat $HOME/cid) sh -c "mkdir build && meson build $OPTS"
else
docker exec --env MAKEFLAGS="-j5 -rR" --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \
--env CXX="ccache g++" --env CFLAGS="-fdirectives-only" --env CXXFLAGS="-fdirectives-only" \
--env LD="ld.gold" $(cat $HOME/cid) sh -c "mkdir build && meson build $OPTS"
fi
else
# Prepare OSX env for build
mkdir -p ~/Library/LaunchAgents

20
.ci/cross_toolchain.txt Normal file
View File

@ -0,0 +1,20 @@
[binaries]
c = 'x86_64-w64-mingw32-gcc'
cpp = 'x86_64-w64-mingw32-g++'
ar = 'x86_64-w64-mingw32-ar'
ranlib = 'x86_64-w64-mingw32-ranlib'
strip = 'x86_64-w64-mingw32-strip'
windres = 'x86_64-w64-mingw32-windres'
pkgconfig = 'pkg-config'
[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'
[properties]
c_args = ['-D_WIN32_WINNT=0x0601', '-I/ewpi-64-install/include', '-O2', '-pipe', '-march=x86-64']
c_link_args = ['-L/ewpi-64-install/lib', '-s']
cpp_args = ['-D_WIN32_WINNT=0x0601', '-I/ewpi-64-install/include', '-O2', '-pipe', '-march=x86-64']
cpp_link_args = ['-L/ewpi-64-install/lib', '-s']

View File

@ -20,6 +20,8 @@ jobs:
env: BUILDSYSTEM=ninja
- os: linux
env: DISTRO=Fedora30-mingw CI_BUILD_TYPE=mingw
- os: linux
env: DISTRO=Fedora30-mingw CI_BUILD_TYPE=mingw BUILDSYSTEM=ninja
- os: linux
env: DISTRO=Fedora29 CI_BUILD_TYPE=options-enabled
- os: linux