Skip to content

Commit

Permalink
travis-ci: Cross compile with minGW
Browse files Browse the repository at this point in the history
also build bundle_zip
  • Loading branch information
miniupnp committed Nov 7, 2017
1 parent c53ee19 commit 9a66707
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .travis.yml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ addons:
apt: apt:
packages: packages:
# packages list: https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise # packages list: https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
- gcc-mingw-w64-i686
- dos2unix
- libsdl1.2-dev - libsdl1.2-dev
- libsdl-image1.2-dev - libsdl-image1.2-dev
# - libsdl2-dev # - libsdl2-dev
Expand All @@ -19,11 +21,17 @@ sudo: false
env: env:
- 'SDLVERSION=1' - 'SDLVERSION=1'
- 'SDLVERSION=2' - 'SDLVERSION=2'
- 'CROSS=mingw'


matrix: matrix:
exclude: exclude:
- os: linux
env: CROSS=mingw
compiler: clang
- os: linux - os: linux
env: SDLVERSION=2 env: SDLVERSION=2
- os: osx
env: CROSS=mingw


compiler: compiler:
- gcc - gcc
Expand All @@ -33,9 +41,12 @@ before_install:
- 'if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update > /dev/null ; fi' - 'if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update > /dev/null ; fi'
- 'if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$SDLVERSION" = "1" ] ; then brew install sdl sdl_image ; fi' - 'if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$SDLVERSION" = "1" ] ; then brew install sdl sdl_image ; fi'
- 'if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$SDLVERSION" = "2" ] ; then brew install sdl2 sdl2_image ; fi' - 'if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$SDLVERSION" = "2" ] ; then brew install sdl2 sdl2_image ; fi'
- 'if [ "$CROSS" = "mingw" ] ; then export CC="i686-w64-mingw32-gcc" ; fi'


script: script:
- 'cd $TRAVIS_BUILD_DIR' - 'cd $TRAVIS_BUILD_DIR'
- './configure --prefix-dir=${HOME}' - 'if [ "$CROSS" = "mingw" ] ; then ./configure --prefix-dir=${HOME} --os=MINGW --without-asound --without-oss --without-munt --without-sdl --without-sdl2 --without-pulse ; else ./configure --prefix-dir=${HOME} ; fi'
- 'make -j3' - 'make -j3'
- 'if [ "$TRAVIS_OS_NAME" = "osx" ]; then make bundle_dmg ; else make install ; fi' - 'make bundle_zip'
- 'if [ "$TRAVIS_OS_NAME" = "osx" ]; then make bundle_dmg ; fi'
- 'if [ "$TRAVIS_OS_NAME" = "linux" ] && [ -z "$CROSS" ] ; then make install ; fi'

0 comments on commit 9a66707

Please sign in to comment.