.appveyor.yml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. version: '{build}'
  2. os: Visual Studio 2015
  3. environment:
  4. matrix:
  5. - arch: x86
  6. compiler: msys2-mingw
  7. backend: ninja
  8. - arch: x64
  9. compiler: msys2-mingw
  10. backend: ninja
  11. - arch: x64
  12. compiler: cygwin
  13. backend: ninja
  14. - arch: x86
  15. compiler: msvc2010
  16. backend: ninja
  17. - arch: x86
  18. compiler: msvc2010
  19. backend: vs2010
  20. - arch: x86
  21. compiler: msvc2015
  22. backend: ninja
  23. BOOST_ROOT: C:\Libraries\Boost_1_59_0
  24. - arch: x86
  25. compiler: msvc2015
  26. backend: vs2015
  27. BOOST_ROOT: C:\Libraries\Boost_1_59_0
  28. - arch: x64
  29. compiler: msvc2017
  30. backend: ninja
  31. APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
  32. BOOST_ROOT: C:\Libraries\Boost_1_64_0
  33. - arch: x64
  34. compiler: msvc2017
  35. backend: vs2017
  36. APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
  37. BOOST_ROOT: C:\Libraries\Boost_1_64_0
  38. platform:
  39. - x64
  40. branches:
  41. only:
  42. - master
  43. init:
  44. - ps: |
  45. If($Env:compiler -like 'msvc2010') {
  46. Set-WinSystemLocale de-DE
  47. Start-Sleep -s 5
  48. Restart-Computer
  49. }
  50. install:
  51. - cmd: set "ORIG_PATH=%PATH%"
  52. # Use a Ninja with QuLogic's patch: https://github.com/ninja-build/ninja/issues/1219
  53. - cmd: set "MESON_FIXED_NINJA=1"
  54. - ps: (new-object net.webclient).DownloadFile('http://nirbheek.in/files/binaries/ninja/win32/ninja.exe', 'C:\projects\meson\ninja.exe')
  55. # Use the x86 python only when building for x86 for the cpython tests.
  56. # For all other archs (including, say, arm), use the x64 python.
  57. - cmd: if %arch%==x86 (set MESON_PYTHON_PATH=C:\python34) else (set MESON_PYTHON_PATH=C:\python34-x64)
  58. # Set paths for BOOST dll files
  59. - cmd: if %compiler%==msvc2015 ( if %arch%==x86 ( set "PATH=%PATH%;C:\Libraries\boost_1_59_0\lib32-msvc-14.0" ) else ( set "PATH=%PATH%;C:\Libraries\boost_1_59_0\lib64-msvc-14.0" ) )
  60. - cmd: if %compiler%==msvc2017 ( if %arch%==x86 ( set "PATH=%PATH%;C:\Libraries\boost_1_64_0\lib32-msvc-14.1" ) else ( set "PATH=%PATH%;C:\Libraries\boost_1_64_0\lib64-msvc-14.1" ) )
  61. # Set paths and config for each build type.
  62. - cmd: if %compiler%==msvc2010 ( call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" %arch% )
  63. - cmd: if %compiler%==msvc2015 ( call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %arch% )
  64. - cmd: if %compiler%==msvc2017 ( call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=%arch% )
  65. - cmd: if %compiler%==cygwin ( set PYTHON=python3 ) else ( set PYTHON=python )
  66. - ps: |
  67. If($Env:compiler -eq 'msys2-mingw') {
  68. If($Env:arch -eq 'x86') {
  69. $env:Path = 'C:\msys64\mingw32\bin;' + $env:Path
  70. $env:MESON_PYTHON_PATH = 'C:\msys64\mingw32\bin'
  71. $env:PYTHON = 'python3'
  72. C:\msys64\usr\bin\pacman -S --noconfirm mingw32/mingw-w64-i686-python3
  73. } Else {
  74. $env:Path = 'C:\msys64\mingw64\bin;' + $env:Path
  75. $env:MESON_PYTHON_PATH = 'C:\msys64\mingw64\bin'
  76. $env:PYTHON = 'python3'
  77. C:\msys64\usr\bin\pacman -S --noconfirm mingw64/mingw-w64-x86_64-python3
  78. }
  79. }
  80. - cmd: if not %compiler%==cygwin ( set "PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%;" )
  81. - cmd: if %compiler%==cygwin ( set WRAPPER=ci\run-in-cygwin.bat )
  82. - cmd: if %compiler%==cygwin ( %WRAPPER% which %PYTHON% ) else ( where %PYTHON% )
  83. # pkg-config is needed for the pkg-config tests on msvc
  84. - ps: If($Env:compiler.StartsWith('msvc')) {(new-object net.webclient).DownloadFile('http://nirbheek.in/files/binaries/pkg-config/win32/pkg-config.exe', 'C:\projects\meson\pkg-config.exe')}
  85. - cmd: if %compiler%==cygwin ( call ci\appveyor-install.bat )
  86. - ps: |
  87. If($Env:compiler -like 'msvc*') {
  88. (new-object net.webclient).DownloadFile(
  89. "https://download.microsoft.com/download/D/B/B/DBB64BA1-7B51-43DB-8BF1-D1FB45EACF7A/msmpisdk.msi",
  90. "C:\projects\msmpisdk.msi")
  91. c:\windows\system32\msiexec.exe /i C:\projects\msmpisdk.msi /quiet
  92. (new-object net.webclient).DownloadFile(
  93. "https://download.microsoft.com/download/D/B/B/DBB64BA1-7B51-43DB-8BF1-D1FB45EACF7A/MSMpiSetup.exe",
  94. "C:\projects\MSMpiSetup.exe")
  95. c:\projects\MSMpiSetup.exe -unattend -full
  96. }
  97. build_script:
  98. - cmd: echo No build step.
  99. - cmd: if %backend%==ninja ( %WRAPPER% ninja.exe --version ) else ( MSBuild /version & echo. )
  100. test_script:
  101. - cmd: echo Running tests for %arch% and %compiler% with the %backend% backend
  102. - cmd: "%WRAPPER% %PYTHON% run_tests.py --backend=%backend%"
  103. on_finish:
  104. - set "PATH=%ORIG_PATH%"
  105. - appveyor PushArtifact meson-test-run.txt -DeploymentName "Text test logs"
  106. - appveyor PushArtifact meson-test-run.xml -DeploymentName "XML test logs"
  107. cache:
  108. - C:\cache