1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-20 20:23:03 +02:00

Travis: add Windows build via MXE

Tests are disabled for MXE since they fail to build. Problem is lack of proper main, but fix might break them on other platforms.
Since we don't have many automated tests anyway better to disable it for now when it's built using MXE.
This commit is contained in:
Arseniy Shestakov 2016-11-05 22:20:46 +03:00
parent 08252a1282
commit c7056c0302
2 changed files with 39 additions and 7 deletions

27
.travis.mxe Normal file
View File

@ -0,0 +1,27 @@
#!/bin/sh
# Add MXE repository and key
echo "deb http://pkg.mxe.cc/repos/apt/debian wheezy main" \
| sudo tee /etc/apt/sources.list.d/mxeapt.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D43A795B73B16ABE9643FE1AFD8FFF16DB45C6AB
# Install needed packages
sudo apt-get update -qq
sudo apt-get install -qq \
mxe-$MXE_TARGET-gcc \
mxe-$MXE_TARGET-boost \
mxe-$MXE_TARGET-zlib \
mxe-$MXE_TARGET-sdl2 \
mxe-$MXE_TARGET-sdl2-gfx \
mxe-$MXE_TARGET-sdl2-image \
mxe-$MXE_TARGET-sdl2-mixer \
mxe-$MXE_TARGET-sdl2-ttf \
mxe-$MXE_TARGET-ffmpeg \
mxe-$MXE_TARGET-qt \
mxe-$MXE_TARGET-qtbase
# alias for CMake
sudo mv /usr/bin/cmake /usr/bin/cmake.orig
sudo ln -s /usr/lib/mxe/usr/bin/$MXE_TARGET-cmake /usr/bin/cmake

View File

@ -6,13 +6,14 @@ dist: trusty
sudo: required
before_install:
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then . .travis.linux; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then . .travis.osx; fi
- if [[ $VCMI_PLATFORM == 'linux' ]]; then . .travis.linux; fi
- if [[ $VCMI_PLATFORM == 'mac' ]]; then . .travis.osx; fi
- if [[ $VCMI_PLATFORM == 'mxe' ]]; then . .travis.mxe; fi
before_script:
- mkdir build
- cd build
- cmake -G "Unix Makefiles" ..
- cmake -G "Unix Makefiles" .. $VCMI_CMAKE_FLAGS
script:
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then cd ..; xcodebuild -project osx/osx-vcmibuilder/vcmibuilder.xcodeproj/ -configuration Release CONFIGURATION_BUILD_DIR=..; cd build; fi
@ -27,17 +28,21 @@ matrix:
include:
- os: linux
compiler: clang
env: REAL_CC=clang-3.4 REAL_CXX=clang++-3.4 PACKAGE=clang-3.4 SUPPORT=libstdc++-4.8-dev
env: VCMI_PLATFORM='linux' REAL_CC=clang-3.4 REAL_CXX=clang++-3.4 PACKAGE=clang-3.4 SUPPORT=libstdc++-4.8-dev
- os: linux
compiler: clang
env: REAL_CC=clang-3.5 REAL_CXX=clang++-3.5 PACKAGE=clang-3.5 SUPPORT=libstdc++-4.8-dev
env: VCMI_PLATFORM='linux' REAL_CC=clang-3.5 REAL_CXX=clang++-3.5 PACKAGE=clang-3.5 SUPPORT=libstdc++-4.8-dev
- os: linux
compiler: clang
env: REAL_CC=clang-3.6 REAL_CXX=clang++-3.6 PACKAGE=clang-3.6 SUPPORT=libstdc++-4.8-dev
env: VCMI_PLATFORM='linux' REAL_CC=clang-3.6 REAL_CXX=clang++-3.6 PACKAGE=clang-3.6 SUPPORT=libstdc++-4.8-dev
- os: linux
compiler: gcc
env: REAL_CC=gcc-4.8 REAL_CXX=g++-4.8 PACKAGE=g++-4.8 SUPPORT=
env: VCMI_PLATFORM='linux' REAL_CC=gcc-4.8 REAL_CXX=g++-4.8 PACKAGE=g++-4.8 SUPPORT=
- os: linux
env: VCMI_PLATFORM='mxe' MXE_TARGET=i686-w64-mingw32.shared VCMI_CMAKE_FLAGS='-DENABLE_TEST=0'
sudo: required
- os: osx
env: VCMI_PLATFORM='mac'
notifications:
email: