Add MinGW-w64 64-bit to the Travis CI

Includes new cross files for MinGW-w64
pull/3695/head
Nirbheek Chauhan 7 years ago committed by Nirbheek Chauhan
parent efa9b75d5d
commit 21dc45dbbb
  1. 20
      cross/linux-mingw-w64-32bit.txt
  2. 20
      cross/linux-mingw-w64-64bit.txt
  3. 25
      cross/ubuntu-mingw.txt
  4. 13
      run_tests.py

@ -0,0 +1,20 @@
[binaries]
c = '/usr/bin/i686-w64-mingw32-gcc'
cpp = '/usr/bin/i686-w64-mingw32-g++'
ar = '/usr/bin/i686-w64-mingw32-ar'
strip = '/usr/bin/i686-w64-mingw32-strip'
pkgconfig = '/usr/bin/i686-w64-mingw32-pkg-config'
windres = '/usr/bin/i686-w64-mingw32-windres'
exe_wrapper = 'wine'
[properties]
# Directory that contains 'bin', 'lib', etc
root = '/usr/i686-w64-mingw32'
# Directory that contains 'bin', 'lib', etc for the toolchain and system libraries
sys_root = '/usr/i686-w64-mingw32/sys-root/mingw'
[host_machine]
system = 'windows'
cpu_family = 'x86'
cpu = 'i686'
endian = 'little'

@ -0,0 +1,20 @@
[binaries]
c = '/usr/bin/x86_64-w64-mingw32-gcc'
cpp = '/usr/bin/x86_64-w64-mingw32-g++'
ar = '/usr/bin/x86_64-w64-mingw32-ar'
strip = '/usr/bin/x86_64-w64-mingw32-strip'
pkgconfig = '/usr/bin/x86_64-w64-mingw32-pkg-config'
windres = '/usr/bin/x86_64-w64-mingw32-windres'
exe_wrapper = 'wine64'
[properties]
# Directory that contains 'bin', 'lib', etc
root = '/usr/x86_64-w64-mingw32'
# Directory that contains 'bin', 'lib', etc for the toolchain and system libraries
sys_root = '/usr/x86_64-w64-mingw32/sys-root/mingw'
[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'

@ -1,25 +0,0 @@
# Something crazy: compiling on Linux a crosscompiler that
# runs on Windows and generates code for OSX.
[binaries]
exe_wrapper = 'wine' # A command used to run generated executables.
c = '/usr/bin/i686-w64-mingw32-gcc'
cpp = '/usr/bin/i686-w64-mingw32-g++'
ar = '/usr/bin/i686-w64-mingw32-ar'
strip = '/usr/bin/i686-w64-mingw32-strip'
pkgconfig = '/usr/bin/mingw32-pkg-config'
[properties]
root = '/usr/i686-w64-mingw32'
[host_machine]
system = 'windows'
cpu_family = 'x86'
cpu = 'i686'
endian = 'little'
[target_machine]
system = 'darwin'
cpu_family = 'arm'
cpu = 'armv7h' # Don't know if this is correct.
endian = 'little'

@ -158,6 +158,9 @@ def get_fake_options(prefix):
def should_run_linux_cross_tests():
return shutil.which('arm-linux-gnueabihf-gcc') and not platform.machine().lower().startswith('arm')
def should_run_mingw_cross_tests():
return shutil.which('x86_64-w64-mingw32-gcc')
def run_configure_inprocess(commandlist):
old_stdout = sys.stdout
sys.stdout = mystdout = StringIO()
@ -244,11 +247,15 @@ if __name__ == '__main__':
# Unit tests
returncode += subprocess.call(mesonlib.python_command + ['run_unittests.py', '-v'], env=env)
# Ubuntu packages do not have a binary without -6 suffix.
cross_test_args = mesonlib.python_command + ['run_cross_test.py']
if should_run_linux_cross_tests():
print(mlog.bold('Running cross compilation tests.').get_text(mlog.colorize_console))
print(mlog.bold('Running armhf cross tests.').get_text(mlog.colorize_console))
print()
returncode += subprocess.call(cross_test_args + ['cross/ubuntu-armhf.txt'], env=env)
if should_run_mingw_cross_tests():
print(mlog.bold('Running mingw-w64 64-bit cross tests.').get_text(mlog.colorize_console))
print()
returncode += subprocess.call(mesonlib.python_command + ['run_cross_test.py', 'cross/ubuntu-armhf.txt'],
env=env)
returncode += subprocess.call(cross_test_args + ['cross/linux-mingw-w64-64bit.txt'], env=env)
# Project tests
returncode += subprocess.call(mesonlib.python_command + ['run_project_tests.py'] + sys.argv[1:], env=env)
sys.exit(returncode)

Loading…
Cancel
Save