From 494789664e3c958efd964d722556a56cb0cc0268 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Mon, 19 May 2014 17:27:25 -0500 Subject: [PATCH] Try to fix Travis CI MinGW builds Listing i686-w64-mingw32-gcc as a compiler stopped working. Travis tries to print version before installing it. $ i686-w64-mingw32-gcc --version /home/travis/build.sh: line 201: i686-w64-mingw32-gcc: command not found The command "i686-w64-mingw32-gcc --version" failed and exited with 127 during setup. --- .travis.yml | 16 +++++++++++----- travis-ci-build.sh | 22 +--------------------- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/.travis.yml b/.travis.yml index 326b7c35..21f80696 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,15 @@ language: c -compiler: - - gcc - - clang - - i686-w64-mingw32-gcc - - x86_64-w64-mingw32-gcc + +env: + # standard builds + - CC=gcc + - CC=clang + # extra libs + - CC=gcc USE_CODEC_VORBIS=1 USE_FREETYPE=1 + - CC=clang USE_CODEC_VORBIS=1 USE_FREETYPE=1 + # cross-compile using mingw + - CC= PLATFORM="mingw32" ARCH="x86" + - CC= PLATFORM="mingw32" ARCH="x86_64" script: ./travis-ci-build.sh diff --git a/travis-ci-build.sh b/travis-ci-build.sh index 97b49699..008bc7e1 100755 --- a/travis-ci-build.sh +++ b/travis-ci-build.sh @@ -2,33 +2,13 @@ failed=0; -# check if testing mingw -if [ "$CC" = "i686-w64-mingw32-gcc" ]; then - export PLATFORM=mingw32 - export ARCH=x86 - export CC= - haveExternalLibs=0 -elif [ "$CC" = "x86_64-w64-mingw32-gcc" ]; then - export PLATFORM=mingw32 - export ARCH=x86_64 - export CC= - haveExternalLibs=0 -else - haveExternalLibs=1 -fi - # Default Build (make clean release) || failed=1; -# Test additional options -if [ $haveExternalLibs -eq 1 ]; then - (make clean release USE_CODEC_VORBIS=1 USE_FREETYPE=1) || failed=1; -fi - if [ $failed -eq 1 ]; then echo "Build failure."; else - echo "All builds successful."; + echo "Build successful."; fi exit $failed;