2
0

appveyor.yml 3.0 KB

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