/appveyor.yml

https://github.com/mcmtroffaes/pycddlib · YAML · 97 lines · 78 code · 13 blank · 6 comment · 0 complexity · ac2521574ef2db5f18b535b3f2078e9d MD5 · raw file

  1. image: Visual Studio 2019
  2. environment:
  3. global:
  4. # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
  5. # /E:ON and /V:ON options are not enabled in the batch script intepreter
  6. # See: http://stackoverflow.com/a/13751649/163740
  7. CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"
  8. PYPIPASSWORD:
  9. secure: L0+QHnkYba7KY7hR3bFsbJ7Y5HW1RtIvOmQtOXQoOck=
  10. matrix:
  11. - PYTHON: "C:\\Python36"
  12. PYTHON_VERSION: "3.6.x"
  13. PYTHON_ARCH: "32"
  14. PLATFORMTOOLSET: "v140"
  15. PLATFORM: "Win32"
  16. - PYTHON: "C:\\Python36-x64"
  17. PYTHON_VERSION: "3.6.x"
  18. PYTHON_ARCH: "64"
  19. PLATFORMTOOLSET: "v140"
  20. PLATFORM: "x64"
  21. - PYTHON: "C:\\Python37"
  22. PYTHON_VERSION: "3.7.x"
  23. PYTHON_ARCH: "32"
  24. PLATFORMTOOLSET: "v140"
  25. PLATFORM: "Win32"
  26. - PYTHON: "C:\\Python37-x64"
  27. PYTHON_VERSION: "3.7.x"
  28. PYTHON_ARCH: "64"
  29. PLATFORMTOOLSET: "v140"
  30. PLATFORM: "x64"
  31. - PYTHON: "C:\\Python38"
  32. PYTHON_VERSION: "3.8.x"
  33. PYTHON_ARCH: "32"
  34. PLATFORMTOOLSET: "v140"
  35. PLATFORM: "Win32"
  36. - PYTHON: "C:\\Python38-x64"
  37. PYTHON_VERSION: "3.8.x"
  38. PYTHON_ARCH: "64"
  39. PLATFORMTOOLSET: "v140"
  40. PLATFORM: "x64"
  41. - PYTHON: "C:\\Python39"
  42. PYTHON_VERSION: "3.9.x"
  43. PYTHON_ARCH: "32"
  44. PLATFORMTOOLSET: "v140"
  45. PLATFORM: "Win32"
  46. - PYTHON: "C:\\Python39-x64"
  47. PYTHON_VERSION: "3.9.x"
  48. PYTHON_ARCH: "64"
  49. PLATFORMTOOLSET: "v140"
  50. PLATFORM: "x64"
  51. install:
  52. - "git submodule update --init --recursive"
  53. - ps: ./cddlib-makefile-gmp.ps1
  54. - "dir cddlib\\lib-src\\"
  55. - "dir C:\\Python*"
  56. - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
  57. - "python --version"
  58. - "python -c \"import struct; print(struct.calcsize('P') * 8)\""
  59. - "appveyor DownloadFile http://mpir.org/mpir-3.0.0.zip"
  60. - "7z x mpir-3.0.0.zip > NUL"
  61. # note: no %CMD_IN_ENV% to ensure latest msbuild to be used
  62. # because the v90 msbuild does not parse the vc10 project file
  63. - "msbuild mpir-3.0.0/build.vc14/lib_mpir_gc/lib_mpir_gc.vcxproj /p:Configuration=Release /p:Platform=%PLATFORM% /p:PlatformToolset=%PLATFORMTOOLSET% /verbosity:normal"
  64. - "dir mpir-3.0.0\\lib\\%PLATFORM%\\Release\\"
  65. - "%CMD_IN_ENV% pip install --install-option=\"--no-cython-compile\" Cython"
  66. - "%CMD_IN_ENV% pip install Sphinx pytest wheel twine numpy"
  67. - "%CMD_IN_ENV% python setup.py build build_ext -Impir-3.0.0/lib/%PLATFORM%/Release/ -Lmpir-3.0.0/build.vc14/lib_mpir_gc/%PLATFORM%/Release/"
  68. - "%CMD_IN_ENV% python setup.py bdist_wheel"
  69. - ps: "ls dist"
  70. - "cd dist"
  71. - "pip install --pre --no-index --find-links=. pycddlib"
  72. - "cd .."
  73. build: false
  74. test_script:
  75. - "%CMD_IN_ENV% sphinx-build -b doctest docs/ docs/_doctest"
  76. - "%CMD_IN_ENV% pytest"
  77. artifacts:
  78. - path: dist\*
  79. # deploy to PyPI if a tagged release
  80. on_success:
  81. - "echo [pypi] > %USERPROFILE%\\.pypirc"
  82. - "echo username=mcmtroffaes >> %USERPROFILE%\\.pypirc"
  83. - "echo password=%PYPIPASSWORD% >> %USERPROFILE%\\.pypirc"
  84. - "if [%APPVEYOR_REPO_TAG%]==[true] ( %CMD_IN_ENV% twine upload dist\\*.whl ) else ( echo \"Not deploying because not a tagged commit.\" )"