appveyor.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. environment:
  2. matrix:
  3. - PYTHON: "C:\\Python27"
  4. PYTHON_VERSION: "2.7.x"
  5. PYTHON_ARCH: "32"
  6. - PYTHON: "C:\\Python27-x64"
  7. PYTHON_VERSION: "2.7.x"
  8. PYTHON_ARCH: "64"
  9. - PYTHON: "C:\\Python33"
  10. PYTHON_VERSION: "3.3.x"
  11. PYTHON_ARCH: "32"
  12. - PYTHON: "C:\\Python33-x64"
  13. PYTHON_VERSION: "3.3.x"
  14. PYTHON_ARCH: "64"
  15. DISTUTILS_USE_SDK: "1"
  16. - PYTHON: "C:\\Python34"
  17. PYTHON_VERSION: "3.4.x"
  18. PYTHON_ARCH: "32"
  19. - PYTHON: "C:\\Python34-x64"
  20. PYTHON_VERSION: "3.4.x"
  21. PYTHON_ARCH: "64"
  22. DISTUTILS_USE_SDK: "1"
  23. - PYTHON: "C:\\Python35"
  24. PYTHON_VERSION: "3.5.x"
  25. PYTHON_ARCH: "32"
  26. - PYTHON: "C:\\Python35-x64"
  27. PYTHON_VERSION: "3.5.x"
  28. PYTHON_ARCH: "64"
  29. - PYTHON: "C:\\Python36"
  30. PYTHON_VERSION: "3.6.x"
  31. PYTHON_ARCH: "32"
  32. - PYTHON: "C:\\Python36-x64"
  33. PYTHON_VERSION: "3.6.x"
  34. PYTHON_ARCH: "64"
  35. install:
  36. # If there is a newer build queued for the same PR, cancel this one.
  37. # The AppVeyor 'rollout builds' option is supposed to serve the same
  38. # purpose but it is problematic because it tends to cancel builds pushed
  39. # directly to master instead of just PR builds (or the converse).
  40. # credits: JuliaLang developers.
  41. - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
  42. https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
  43. Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
  44. throw "There are newer queued builds for this pull request, failing early." }
  45. - ECHO "Filesystem root:"
  46. - ps: "ls \"C:/\""
  47. - ECHO "Installed SDKs:"
  48. - ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
  49. # Install Python (from the official .msi of http://python.org) and pip when
  50. # not already installed.
  51. - ps: if (-not(Test-Path($env:PYTHON))) { & appveyor\install.ps1 }
  52. # Prepend newly installed Python to the PATH of this build (this cannot be
  53. # done from inside the powershell script as it would require to restart
  54. # the parent CMD process).
  55. - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
  56. # Check that we have the expected version and architecture for Python
  57. - "build.cmd %PYTHON%\\python.exe --version"
  58. - "build.cmd %PYTHON%\\python.exe -c \"import struct; print(struct.calcsize('P') * 8)\""
  59. # Install setuptools/wheel so that we can e.g. use bdist_wheel
  60. - "pip install setuptools wheel"
  61. - "build.cmd %PYTHON%\\python.exe setup.py develop"
  62. build_script:
  63. # Build the compiled extension
  64. - "build.cmd %PYTHON%\\python.exe setup.py build"
  65. test_script:
  66. - "build.cmd %PYTHON%\\python.exe setup.py test"
  67. after_test:
  68. - "build.cmd %PYTHON%\\python.exe setup.py bdist_wheel"
  69. # http://stackoverflow.com/questions/43255455/unicode-character-causing-error-with-bdist-wininst-on-python-3-but-not-python-2
  70. # - "python setup.py bdist_wininst"
  71. - "build.cmd %PYTHON%\\python.exe setup.py bdist_msi"
  72. - ps: "ls dist"
  73. artifacts:
  74. - path: dist\*