ci/travis: add meson windows cross build
authorStefan Schmidt <s.schmidt@samsung.com>
Wed, 29 May 2019 16:20:15 +0000 (12:20 -0400)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 3 Jun 2019 07:04:07 +0000 (16:04 +0900)
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

.ci/ci-configure.sh
.ci/cross_toolchain.txt [new file with mode: 0644]
.travis.yml

index 77236ec..75e16af 100755 (executable)
@@ -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
diff --git a/.ci/cross_toolchain.txt b/.ci/cross_toolchain.txt
new file mode 100644 (file)
index 0000000..b9cd19a
--- /dev/null
@@ -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']
index 5485339..50ce7a7 100644 (file)
@@ -21,6 +21,8 @@ jobs:
     - 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
       env: DISTRO=Fedora29 CI_BUILD_TYPE=options-disabled