ref: cd415916ac95c8a721f4373aa3d91daae7c08d87
parent: 5ac0f5d160cae9282f6094b012454ea00c55f7a9
author: Clownacy <Clownacy@users.noreply.github.com>
date: Thu Jan 23 11:12:33 EST 2020
Travis: Try to fix WINDRES and 32-bit builds
--- a/.travis.yml
+++ b/.travis.yml
@@ -40,12 +40,13 @@
export msys2='cmd //C RefreshEnv.cmd '
export msys2+='& set MSYS=winsymlinks:nativestrict '
export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start'
+ export mingw64="$msys2 -mingw32 -full-path -here -c "\"\$@"\" --"
export mingw64="$msys2 -mingw64 -full-path -here -c "\"\$@"\" --"
export msys2+=" -msys2 -c "\"\$@"\" --"
- $msys2 pacman --sync --noconfirm --needed make mingw-w64-x86_64-toolchain
+ $msys2 pacman --sync --noconfirm --needed make mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain
taskkill //IM gpg-agent.exe //F # https://travis-ci.community/t/4967
- export PATH=/C/tools/msys64/mingw64/bin:$PATH
- export MAKE=mingw32-make # so that Autotools can find it
+# export PATH=/C/tools/msys64/mingw64/bin:$PATH
+# export MAKE=mingw32-make # so that Autotools can find it
;;
esac
@@ -62,12 +63,35 @@
# Display build type
- echo $MAKE_BUILD_TYPE
+ # Define WINDRES
+ - if [ "$TRAVIS_OS_NAME" = "windows" ];
+ then;
+ export WINDRES32="windres"
+ export WINDRES64="windres"
+ else;
+ export WINDRES32="i686-w64-mingw32-windres"
+ export WINDRES64="x86_64-w64-mingw32-windres"
+ fi
+
# Display compilers name/version
- - $mingw64 echo ${CC}
- - $mingw64 echo ${CXX}
- - $mingw64 ${CC} --version
- - $mingw64 ${CXX} --version
+ - if [ "$TRAVIS_OS_NAME" = "windows" ];
+ then;
+ $mingw32 echo ${CC};
+ $mingw32 echo ${CXX};
+ $mingw32 ${CC} --version;
+ $mingw32 ${CXX} --version;
+ $mingw64 echo ${CC};
+ $mingw64 echo ${CXX};
+ $mingw64 ${CC} --version;
+ $mingw64 ${CXX} --version;
+ else;
+ echo ${CC};
+ echo ${CXX};
+ ${CC} --version;
+ ${CXX} --version;
+ fi
+
before_cache:
- |-
case $TRAVIS_OS_NAME in
@@ -91,10 +115,10 @@
script:
# Compile 32-bit build
- # - $mingw64 make -j ${JOBS} FIX_BUGS=1 ${MAKE_BUILD_TYPE} WARNINGS=1 WARNINGS_ALL=1 WINDOWS=1 STATIC=1 CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ WINDRES=i686-w64-mingw32-windres
+ - $mingw32 make -j ${JOBS} FIX_BUGS=1 ${MAKE_BUILD_TYPE} WARNINGS=1 WARNINGS_ALL=1 WINDOWS=1 STATIC=1 CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ WINDRES=${WINDRES32}
# Compile 64-bit build
- - $mingw64 make -j ${JOBS} FIX_BUGS=1 ${MAKE_BUILD_TYPE} WARNINGS=1 WARNINGS_ALL=1 WINDOWS=1 STATIC=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ WINDRES=x86_64-w64-mingw32-windres
+ - $mingw64 make -j ${JOBS} FIX_BUGS=1 ${MAKE_BUILD_TYPE} WARNINGS=1 WARNINGS_ALL=1 WINDOWS=1 STATIC=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ WINDRES=${WINDRES64}
after_success:
# Send success notification to Discord through DISCORD_WEBHOOK_URL