.appveyor.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. version: '{build}'
  2. os: Visual Studio 2015
  3. environment:
  4. matrix:
  5. - arch: x86
  6. compiler: msys2-mingw
  7. backend: ninja
  8. - arch: x86
  9. compiler: msvc2010
  10. backend: ninja
  11. - arch: x86
  12. compiler: msvc2010
  13. backend: vs2010
  14. - arch: x86
  15. compiler: msvc2015
  16. backend: ninja
  17. - arch: x86
  18. compiler: msvc2015
  19. backend: vs2015
  20. - arch: x64
  21. compiler: cygwin
  22. backend: ninja
  23. - arch: x64
  24. compiler: msys2-mingw
  25. backend: ninja
  26. - arch: x64
  27. compiler: msvc2017
  28. backend: ninja
  29. APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
  30. - arch: x64
  31. compiler: msvc2017
  32. backend: vs2017
  33. APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
  34. platform:
  35. - x64
  36. branches:
  37. only:
  38. - master
  39. skip_commits:
  40. files:
  41. - docs/**/*
  42. install:
  43. - cmd: set "ORIG_PATH=%PATH%"
  44. # Boost 1.56.0: https://www.appveyor.com/docs/build-environment/#boost
  45. #- cmd: set "BOOST_ROOT=C:\Libraries\boost"
  46. # Use the x86 python only when building for x86 for the cpython tests.
  47. # For all other archs (including, say, arm), use the x64 python.
  48. - ps: (new-object net.webclient).DownloadFile('https://www.dropbox.com/s/bbzvepq85hv47x1/ninja.exe?dl=1', 'C:\projects\meson\ninja.exe')
  49. - cmd: if %arch%==x86 (set MESON_PYTHON_PATH=C:\python34) else (set MESON_PYTHON_PATH=C:\python34-x64)
  50. # Set paths and config for each build type.
  51. - cmd: if %compiler%==msvc2010 ( call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" %arch% )
  52. - cmd: if %compiler%==msvc2015 ( call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %arch% )
  53. - cmd: if %compiler%==msvc2017 ( call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=%arch% )
  54. - cmd: if %compiler%==msys2-mingw (if %arch%==x86 (set "PATH=C:\msys64\mingw32\bin;%PATH%") else (set "PATH=C:\msys64\mingw64\bin;%PATH%"))
  55. - cmd: if not %compiler%==cygwin ( set "PATH=%cd%;%MESON_PYTHON_PATH%;%PATH%;" )
  56. - cmd: if %compiler%==cygwin ( set PYTHON=python3 ) else ( set PYTHON=python )
  57. - cmd: if %compiler%==cygwin ( set WRAPPER=ci\run-in-cygwin.bat )
  58. - cmd: if %compiler%==cygwin ( %WRAPPER% which %PYTHON% ) else ( where %PYTHON% )
  59. # Install additional packages needed for specific builds.
  60. - ps: If($Env:compiler -eq 'msys2-mingw') {(new-object Net.WebClient).DownloadFile('https://bootstrap.pypa.io/get-pip.py', 'C:\projects\meson\get-pip.py')}
  61. - cmd: if %compiler%==msys2-mingw ( %PYTHON% "C:\projects\meson\get-pip.py" )
  62. - cmd: if %compiler%==cygwin ( call ci\appveyor-install.bat )
  63. # Install additional packages needed for all builds.
  64. - cmd: "%WRAPPER% %PYTHON% -m pip install codecov"
  65. build_script:
  66. - cmd: echo No build step.
  67. - cmd: if %backend%==ninja ( %WRAPPER% ninja.exe --version ) else ( MSBuild /version & echo. )
  68. test_script:
  69. - cmd: echo Running tests for %arch% and %compiler% with the %backend% backend
  70. - cmd: "%WRAPPER% %PYTHON% run_tests.py --cov --backend=%backend%"
  71. after_test:
  72. - cmd: "%WRAPPER% %PYTHON% -m coverage combine"
  73. # Generate XML report manually because codecov module doesn't know how to run it properly.
  74. - cmd: "%WRAPPER% %PYTHON% -m coverage xml"
  75. - cmd: "%WRAPPER% %PYTHON% -m codecov -X search pycov -f coverage.xml -n windows-%arch%-%compiler%-%backend%"
  76. on_finish:
  77. - set "PATH=%ORIG_PATH%"
  78. - appveyor PushArtifact meson-test-run.txt -DeploymentName "Text test logs"
  79. - appveyor PushArtifact meson-test-run.xml -DeploymentName "XML test logs"
  80. cache:
  81. - C:\cache