1version: '{build}-{branch}' 2 3build: 4 verbosity: minimal 5 6environment: 7 matrix: 8 # Pre-installed Python versions, which Appveyor may upgrade to 9 # a later point release. 10 # See: http://www.appveyor.com/docs/installed-software#python 11 12 - PYTHON: "C:\\Python35" 13 PYTHON_VERSION: "3.5.x" 14 PYTHON_ARCH: "32" 15 16 - PYTHON: "C:\\Python35-x64" 17 PYTHON_VERSION: "3.5.x" 18 PYTHON_ARCH: "64" 19 20 - PYTHON: "C:\\Python36" 21 PYTHON_VERSION: "3.6.x" 22 PYTHON_ARCH: "32" 23 24 - PYTHON: "C:\\Python36-x64" 25 PYTHON_VERSION: "3.6.x" 26 PYTHON_ARCH: "64" 27 28 - PYTHON: "C:\\Python37" 29 PYTHON_VERSION: "3.7.x" 30 PYTHON_ARCH: "32" 31 32 - PYTHON: "C:\\Python37-x64" 33 PYTHON_VERSION: "3.7.x" 34 PYTHON_ARCH: "64" 35 36 - PYTHON: "C:\\Python38" 37 PYTHON_VERSION: "3.8.x" 38 PYTHON_ARCH: "32" 39 40 - PYTHON: "C:\\Python38-x64" 41 PYTHON_VERSION: "3.8.x" 42 PYTHON_ARCH: "64" 43 44install: 45 # If there is a newer build queued for the same PR, cancel this one. 46 # The AppVeyor 'rollout builds' option is supposed to serve the same 47 # purpose but it is problematic because it tends to cancel builds pushed 48 # directly to master instead of just PR builds (or the converse). 49 # credits: JuliaLang developers. 50 - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` 51 https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` 52 Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` 53 throw "There are newer queued builds for this pull request, failing early." } 54 55 # Install Python (from the official .msi of http://python.org) and pip when 56 # not already installed. 57 - ps: if (-not(Test-Path($env:PYTHON))) { & appveyor\install.ps1 } 58 59 # Prepend newly installed Python to the PATH of this build (this cannot be 60 # done from inside the powershell script as it would require to restart 61 # the parent CMD process). 62 - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" 63 64 # Check that we have the expected version and architecture for Python 65 - "python --version" 66 - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" 67 68 # Upgrade to the latest version of pip to avoid it displaying warnings 69 # about it being out of date. 70 - "python -m pip install --disable-pip-version-check --user --upgrade pip" 71 72 # Change to project directory 73 - "CD %APPVEYOR_BUILD_FOLDER%" 74 75 # Update git submodules (required for OpenAPI spec examples) 76 - git submodule update --init --recursive 77 78 # Install the build dependencies of the project. If some dependencies contain 79 # compiled extensions and are not provided as pre-built wheel packages, 80 # pip will build them from source using the MSVC compiler matching the 81 # target Python version and architecture 82 - "python -m pip install -r requirements_no_icu.txt" 83 84build_script: 85 # Build the compiled extension 86 - "python setup.py build" 87 88test_script: 89 # Run the project tests 90 - python setup.py test --addopts "-m 'not requires_network'" 91