.appveyor.yml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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_60_0
  24. - arch: x86
  25. compiler: msvc2015
  26. backend: vs2015
  27. BOOST_ROOT: C:\Libraries\Boost_1_60_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. # Release branches
  44. - /^[0-9]+\.[0-9]+$/
  45. init:
  46. - ps: |
  47. If($Env:compiler -like 'msvc2010') {
  48. Set-WinSystemLocale de-DE
  49. Start-Sleep -s 5
  50. Restart-Computer
  51. }
  52. install:
  53. - ps: |
  54. function DownloadFile([String] $Source, [String] $Destination) {
  55. $retries = 10
  56. for ($i = 1; $i -le $retries; $i++) {
  57. try {
  58. (New-Object net.webclient).DownloadFile($Source, $Destination)
  59. break # succeeded
  60. } catch [net.WebException] {
  61. if ($i -eq $retries) {
  62. throw # fail on last retry
  63. }
  64. $backoff = (10 * $i) # backoff 10s, 20s, 30s...
  65. echo ('{0}: {1}' -f $Source, $_.Exception.Message)
  66. echo ('Retrying in {0}s...' -f $backoff)
  67. Start-Sleep -m ($backoff * 1000)
  68. }
  69. }
  70. }
  71. - cmd: set "ORIG_PATH=%PATH%"
  72. # Use a Ninja with QuLogic's patch: https://github.com/ninja-build/ninja/issues/1219
  73. - cmd: set "MESON_FIXED_NINJA=1"
  74. - ps: DownloadFile -Source 'http://nirbheek.in/files/binaries/ninja/win32/ninja.exe' -Destination 'C:\projects\meson\ninja.exe'
  75. # Use the x86 python only when building for x86 for the cpython tests.
  76. # For all other archs (including, say, arm), use the x64 python.
  77. - cmd: if %arch%==x86 (set MESON_PYTHON_PATH=C:\python35) else (set MESON_PYTHON_PATH=C:\python35-x64)
  78. # Skip CI requires python
  79. - cmd: python ./skip_ci.py --base-branch-env=APPVEYOR_REPO_BRANCH --is-pull-env=APPVEYOR_PULL_REQUEST_NUMBER
  80. # Set paths for BOOST dll files
  81. - cmd: if %compiler%==msvc2015 ( if %arch%==x86 ( set "PATH=%PATH%;%BOOST_ROOT%\lib32-msvc-14.0" ) else ( set "PATH=%PATH%;%BOOST_ROOT%\lib64-msvc-14.0" ) )
  82. - cmd: if %compiler%==msvc2017 ( if %arch%==x86 ( set "PATH=%PATH%;%BOOST_ROOT%\lib32-msvc-14.1" ) else ( set "PATH=%PATH%;%BOOST_ROOT%\lib64-msvc-14.1" ) )
  83. # Set paths and config for each build type.
  84. - cmd: if %compiler%==msvc2010 ( call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" %arch% )
  85. - cmd: if %compiler%==msvc2015 ( call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %arch% )
  86. - cmd: if %compiler%==msvc2017 ( call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=%arch% )
  87. - cmd: if %compiler%==cygwin ( set PYTHON=python3 ) else ( set PYTHON=python )
  88. # MinGW setup, lines are split to prevent "The input line is too long." error.
  89. - cmd: if %arch%==x86 ( set "PACMAN_ARCH=i686" ) else ( set "PACMAN_ARCH=x86_64" )
  90. - cmd: if %arch%==x86 ( set "PACMAN_BITS=32" ) else ( set "PACMAN_BITS=64" )
  91. - cmd: if %compiler%==msys2-mingw ( set "PATH=C:\msys64\mingw%PACMAN_BITS%\bin;%PATH%" )
  92. - cmd: if %compiler%==msys2-mingw ( set "MESON_PYTHON_PATH=C:\msys64\mingw%PACMAN_BITS%\bin" )
  93. - cmd: if %compiler%==msys2-mingw ( set "PYTHON=python3" )
  94. - cmd: if %compiler%==msys2-mingw ( C:\msys64\usr\bin\pacman -S --needed --noconfirm "mingw%PACMAN_BITS%/mingw-w64-%PACMAN_ARCH%-python3" )
  95. # Cygwin
  96. - cmd: if not %compiler%==cygwin ( set "PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%;" )
  97. - cmd: if %compiler%==cygwin ( set WRAPPER=ci\run-in-cygwin.bat )
  98. - cmd: if %compiler%==cygwin ( %WRAPPER% which %PYTHON% ) else ( where %PYTHON% )
  99. # pkg-config is needed for the pkg-config tests on msvc
  100. - ps: |
  101. If($Env:compiler.StartsWith('msvc')) {
  102. DownloadFile -Source 'http://nirbheek.in/files/binaries/pkg-config/win32/pkg-config.exe' `
  103. -Destination 'C:\projects\meson\pkg-config.exe'
  104. }
  105. - cmd: if %compiler%==cygwin ( call ci\appveyor-install.bat )
  106. - ps: |
  107. If($Env:compiler -like 'msvc*') {
  108. DownloadFile -Source "https://download.microsoft.com/download/D/B/B/DBB64BA1-7B51-43DB-8BF1-D1FB45EACF7A/msmpisdk.msi" `
  109. -Destination "C:\projects\msmpisdk.msi"
  110. c:\windows\system32\msiexec.exe /i C:\projects\msmpisdk.msi /quiet
  111. DownloadFile -Source "https://download.microsoft.com/download/D/B/B/DBB64BA1-7B51-43DB-8BF1-D1FB45EACF7A/MSMpiSetup.exe" `
  112. -Destination "C:\projects\MSMpiSetup.exe"
  113. c:\projects\MSMpiSetup.exe -unattend -full
  114. }
  115. build_script:
  116. - cmd: echo No build step.
  117. - cmd: if %backend%==ninja ( %WRAPPER% ninja.exe --version ) else ( MSBuild /version & echo. )
  118. test_script:
  119. - cmd: echo Running tests for %arch% and %compiler% with the %backend% backend
  120. - cmd: "%WRAPPER% %PYTHON% run_tests.py --backend=%backend%"
  121. on_finish:
  122. - set "PATH=%ORIG_PATH%"
  123. - appveyor PushArtifact meson-test-run.txt -DeploymentName "Text test logs"
  124. - appveyor PushArtifact meson-test-run.xml -DeploymentName "XML test logs"
  125. cache:
  126. - C:\cache