branches: only: - master - /windows.*/ environment: global: # All security sensitive variables have to be encrypted! # https://ci.appveyor.com/account/mcepl/tools/encrypt # https://www.appveyor.com/docs/build-configuration/#secure-variables USER: secure: oqWqarxnd4H23FMywnlQeg== PASS: secure: j/VSxdYJ7mdR44u8OdywLg== X86_OPENSSL_INSTALLER: Win32OpenSSL-1_1_1t.exe X64_OPENSSL_INSTALLER: Win64OpenSSL-1_1_1t.exe # Random password, never used anywhere else APPVEYOR_RDP_PASSWORD: MmXt9yk3rNah3CGcRWad3XD PYPI_USERNAME: __token__ PYPI_PASSWORD: secure: d8luupfz+8NXAuOFgYa+opNTwFYSk5lCcLj+SAcNe5xsprkB54ChOC+wVztT2ascdJqhU5U9KH1xE7gajYcmo4/fd2r1yJTGSdL6L0PGkNzMYGfVZ35GYESMvdezz42cQOmHzJ3WmymA5XoeyRH74I07VsHgDkYvk5Iz6fwZ1vxkNQbL02hD5IDRABkjm/gjmaYBHGhUi+NZ197jFpuMClrFhjqG87M0+oj8dbVperkYF4pKxeDsM4HofsgOxqRbjxSJtcrOcyhTYOWrrbWA1g== matrix: # Pre-installed Python versions, which Appveyor may upgrade to # a later point release. - PYTHON: "C:\\Python38" PYTHON_VERSION: "3.8.x" PYTHON_ARCH: "32" OPENSSL_PATH: "C:\\OpenSSL-1-1-Win32" PYWIN32: "pywin32-305.win32-py3.8.exe" PYWIN32_RELEASE: b305 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 PYTHONPATH_DIR: "win32-3.8" - PYTHON: "C:\\Python38-x64" PYTHON_VERSION: "3.8.x" PYTHON_ARCH: "64" OPENSSL_PATH: "C:\\OpenSSL-1-1-Win64" PYWIN32: "pywin32-305.win-amd64-py3.8.exe" PYWIN32_RELEASE: b305 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 PYTHONPATH_DIR: "win-amd64-3.8" - PYTHON: "C:\\Python39" PYTHON_VERSION: "3.9.x" PYTHON_ARCH: "32" OPENSSL_PATH: "C:\\OpenSSL-1-1-Win32" PYWIN32: "pywin32-305.win32-py3.9.exe" PYWIN32_RELEASE: b305 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 PYTHONPATH_DIR: "win32-3.9" - PYTHON: "C:\\Python39-x64" PYTHON_VERSION: "3.9.x" PYTHON_ARCH: "64" OPENSSL_PATH: "C:\\OpenSSL-1-1-Win64" PYWIN32: "pywin32-305.win-amd64-py3.9.exe" PYWIN32_RELEASE: b305 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 PYTHONPATH_DIR: "win-amd64-3.9" - PYTHON: "C:\\Python310" PYTHON_VERSION: "3.10.x" PYTHON_ARCH: "32" OPENSSL_PATH: "C:\\OpenSSL-1-1-Win32" PYWIN32: "pywin32-305.win32-py3.10.exe" PYWIN32_RELEASE: b305 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 PYTHONPATH_DIR: "win32-cpython-310" - PYTHON: "C:\\Python310-x64" PYTHON_VERSION: "3.10.x" PYTHON_ARCH: "64" OPENSSL_PATH: "C:\\OpenSSL-1-1-Win64" PYWIN32: "pywin32-305.win-amd64-py3.10.exe" PYWIN32_RELEASE: b305 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 PYTHONPATH_DIR: "win-amd64-cpython-310" - PYTHON: "C:\\Python311" PYTHON_VERSION: "3.11.x" PYTHON_ARCH: "32" OPENSSL_PATH: "C:\\OpenSSL-1-1-Win32" PYWIN32: "pywin32-305.win32-py3.11.exe" PYWIN32_RELEASE: b305 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 PYTHONPATH_DIR: "win32-cpython-311" - PYTHON: "C:\\Python311-x64" PYTHON_VERSION: "3.11.x" PYTHON_ARCH: "64" OPENSSL_PATH: "C:\\OpenSSL-1-1-Win64" PYWIN32: "pywin32-305.win-amd64-py3.11.exe" PYWIN32_RELEASE: b305 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 PYTHONPATH_DIR: "win-amd64-cpython-311" - PYTHON: "C:\\Python27-x64" PYTHON_VERSION: "2.7.x" # currently 2.7.9 PYTHON_ARCH: "64" OPENSSL_PATH: "C:\\OpenSSL-1-1-Win64" PYWIN32: "pywin32-228.win-amd64-py2.7.exe" PYWIN32_RELEASE: b228 PYTHONPATH_DIR: "win-amd64-2.7" matrix: allow_failures: - PYTHON: "C:\\Python27-x64" nuget: account_feed: true install: # Install non-python dependencies using chocolatey package manager - choco install -r -y swig # Install Python (from the official .msi of http://python.org) and pip when # not already installed. - ps: if (-not(Test-Path($env:PYTHON))) { & appveyor\install.ps1 } # Prepend newly installed Python to the PATH of this build (this cannot be # done from inside the powershell script as it would require to restart # the parent CMD process). - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%;%OPENSSL_PATH%\\bin" # Check that we have the expected version and architecture for Python - "python --version" - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" # Install the build dependencies of the project. If some dependencies contain # compiled extensions and are not provided as pre-built wheel packages, # pip will build them from source using the MSVC compiler matching the # target Python version and architecture - "%PYTHON%\\Scripts\\pip.exe install -r dev-requirements.txt" - ECHO "Install OpenSSL 32bit" - curl -o "c:\\%X86_OPENSSL_INSTALLER%" -fsSL "https://slproweb.com/download/%X86_OPENSSL_INSTALLER%" - "c:\\%X86_OPENSSL_INSTALLER% /silent /verysilent /DIR=C:\\OpenSSL-1-1-Win32" - ECHO "Install OpenSSL 64bit" - curl -o "c:\\%X64_OPENSSL_INSTALLER%" -fsSL "https://slproweb.com/download/%X64_OPENSSL_INSTALLER%" - "c:\\%X64_OPENSSL_INSTALLER% /silent /verysilent /DIR=C:\\OpenSSL-1-1-Win64" - ECHO "Install pywin32" - "python -m pip install pywin32" #- mkdir pywin32 #- 7z x "%PYWIN32%" -opywin32 #- xcopy /e "pywin32\\PLATLIB" "%PYTHON%\\Lib\\site-packages" - ECHO "Filesystem root:" - ps: "ls \"C:/\"" - ps: "ls \"C:/OpenSSL-Win32\"" - ECHO "Installed SDKs:" - ps: if (Test-Path "C:/Program Files/Microsoft SDKs/Windows") { ls "C:/Program Files/Microsoft SDKs/Windows" } - ECHO "Appveyor OpenSSL Version (%OPENSSL_VERSION%)" - "%OPENSSL_PATH%/bin/openssl.exe version" - ECHO "Python OpenSSL Version (%PYTHON%)" - "%PYTHON%\\python.exe -c \"import ssl; print(getattr(ssl, 'OPENSSL_VERSION', None))\"" # init: # - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) build_script: - "%PYTHON%\\python.exe setup.py build --openssl=\"%OPENSSL_PATH%\" --bundledlls" test_script: - "dir .\\build" - "SET PYTHONPATH=.\\build\\lib.%PYTHONPATH_DIR%" - "%PYTHON%\\python.exe -mtap discover -v tests" after_test: # If tests are successful, create a whl package for the project. - "%PYTHON%\\python.exe setup.py bdist_wheel" - "dir .\\dist" artifacts: # Archive the generated wheel package in the ci.appveyor.com build report. - path: dist\* - path: src/SWIG/_m2crypto_wrap.c name: _m2crypto_wrap.zip type: zip on_success: - ps: | If ($env:APPVEYOR_REPO_TAG -eq "true") { Invoke-Expression -erroraction 'silentlycontinue' "twine upload -u $env:PYPI_USERNAME -p $env:PYPI_PASSWORD --skip-existing dist/*" } on_finish: - ps: Get-ChildItem src\SWIG\_m2crypto_wrap.c | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } - "SET PYTHONPATH=" # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))