appveyor.yml 2.8 KB

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