Add Windows to TravisCI

Implement the generation of Travis jobs for Windows. Currently, the
generated jobs replicate Appveyor setup and complete successfully. There
is support for MinGW GCC and MSVC compilers as well as 64 and 32 bit
compilation. Linux and MacOS jobs behave identically, but some
environment variables change - CROSS_COMPILE_32BIT=yes is added for
builds with cross compilation, empty COMPILER_FLAGS are not set anymore.
This commit is contained in:
Alex Lapenkou 2021-12-21 16:15:14 -08:00 committed by Alexander Lapenkov
parent b798fabdf7
commit 01a293fc08
6 changed files with 375 additions and 175 deletions

View file

@ -0,0 +1,20 @@
#!/bin/bash
set -e
if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then
echo "Incorrect \$TRAVIS_OS_NAME: expected windows, got $TRAVIS_OS_NAME"
exit 1
fi
$build_env autoconf
$build_env ./configure $CONFIGURE_FLAGS
# mingw32-make simply means "make", unrelated to mingw32 vs mingw64.
# Simply disregard the prefix and treat is as "make".
$build_env mingw32-make -j3
# At the moment, it's impossible to make tests in parallel,
# seemingly due to concurrent writes to '.pdb' file. I don't know why
# that happens, because we explicitly supply '/Fs' to the compiler.
# Until we figure out how to fix it, we should build tests sequentially
# on Windows.
$build_env mingw32-make tests