File: appveyor.yml

package info (click to toggle)
python-gevent 25.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 22,036 kB
  • sloc: python: 170,894; ansic: 82,360; sh: 6,265; makefile: 1,550; javascript: 108
file content (206 lines) | stat: -rw-r--r-- 8,164 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
clone_depth: 50
max_jobs: 8
shallow_clone: true
build:
  parallel: true
  verbosity: minimal
image: Visual Studio 2022

environment:
  global:
    # We default to four on CI, but only have two cores available.
    # Try to reduce the chances of timeout.
    NWORKERS: 2
    APPVEYOR_SAVE_CACHE_ON_ERROR: "true"
    # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
    # /E:ON and /V:ON options are not enabled in the batch script interpreter
    # See: http://stackoverflow.com/a/13751649/163740
    CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"
    # Use a fixed hash seed for reproducability
    PYTHONHASHSEED: 8675309
    # Disable tests that use external network resources;
    # too often we get failures to resolve DNS names or failures
    # to connect on AppVeyor.
    GEVENTTEST_USE_RESOURCES: "-network"
    PIP_NO_WARN_SCRIPT_LOCATION: 1
    PIP_UPGRADE_STRATEGY: eager
    # Enable this if debugging a resource leak. Otherwise
    # it slows things down.
    # PYTHONTRACEMALLOC: 10
    ##
    # Upload settings for twine.
    TWINE_USERNAME: "__token__"
    TWINE_PASSWORD:
      secure: uXZ6Juhz2hElaTsaJ2Hnemm+YoYbjpkoT5NFFlj4xxSlZvUrjoiOdvPqxxCaNYozWIRM5QmXlj1nOF8nZDpzx7oAyVIMT2x3z9iI0C/G5r4G8uvbJJq6wpJRI5HQ3sE39qLK2MCPZJ3BTu/uvVgWWqQ6wInKXxNqDGyf9IgZOv3/sCd4CwD7bEqlwHzyeh9a2o17a5J1YMhL03LVRcrlmjN8/Ds642FtnF/e+VAhUdtZvU1ze8rfeR7KCe4ehOmy18dh5joPX8TJKbg/AJlIYQ==


  matrix:
    # http://www.appveyor.com/docs/installed-software#python

    # Fully supported 64-bit versions, with testing. This should be
    # all the current (non EOL) versions.
    - PYTHON: "C:\\Python314-x64"
      PYTHON_VERSION: "3.14.0rc1"
      PYTHON_ARCH: "64"
      PYTHON_EXE: python

    - PYTHON: "C:\\Python313-x64"
      PYTHON_VERSION: "3.13.5"
      PYTHON_ARCH: "64"
      PYTHON_EXE: python

    - PYTHON: "C:\\Python312-x64"
      PYTHON_VERSION: "3.12.0"
      PYTHON_ARCH: "64"
      PYTHON_EXE: python

    # 64-bit
    - PYTHON: "C:\\Python311-x64"
      PYTHON_VERSION: "3.11.0"
      PYTHON_ARCH: "64"
      PYTHON_EXE: python

    # TODO: What's the latest pypy?
    # - PYTHON: "C:\\pypy3.7-v7.3.7-win64"
    #   PYTHON_ID: "pypy3"
    #   PYTHON_EXE: pypy3w
    #   PYTHON_VERSION: "3.7.x"
    #   PYTHON_ARCH: "64"
    #   APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019

    - PYTHON: "C:\\Python310-x64"
      PYTHON_VERSION: "3.10.0"
      PYTHON_ARCH: "64"
      PYTHON_EXE: python

    # 3.9 is security fix only, goes unsupported in October 2025.
    # Disable tests for that.
    - PYTHON: "C:\\Python39-x64"
      PYTHON_VERSION: "3.9.x"
      PYTHON_ARCH: "64"
      PYTHON_EXE: python
      GWHEEL_ONLY: true

    # Tests were already disabled here before 3.9 went EOL because
    # we stopped testing or providing 32-bit builds.
    - PYTHON: "C:\\Python39"
      PYTHON_VERSION: "3.9.x"
      PYTHON_ARCH: "32"
      PYTHON_EXE: python
      GWHEEL_ONLY: true


    # Also test a Python version not pre-installed
    # See: https://github.com/ogrisel/python-appveyor-demo/issues/10

    # - PYTHON: "C:\\Python266"
    #   PYTHON_VERSION: "2.6.6"
    #   PYTHON_ARCH: "32"
    #   PYTHON_EXE: python

# matrix:
#   allow_failures:
#     - PYTHON_ID: "pypy"

install:
  # If there is a newer build queued for the same PR, cancel this one.
  # The AppVeyor 'rollout builds' option is supposed to serve the same
  # purpose but it is problematic because it tends to cancel builds pushed
  # directly to master instead of just PR builds (or the converse).
  # credits: JuliaLang developers.
  - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
        https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
        Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
          throw "There are newer queued builds for this pull request, failing early." }
  - ECHO "Filesystem root:"
  - ps: "ls \"C:/\""

  - ECHO "Installed SDKs:"
  - ps: "if(Test-Path(\"C:/Program Files/Microsoft SDKs/Windows\")) {ls \"C:/Program Files/Microsoft SDKs/Windows\";}"

  - ECHO "Installed Kits:"
  - ps: "if(Test-Path(\"C:/Program Files (x86)/Windows Kits\")) {ls \"C:/Program Files (x86)/Windows Kits\";}"

  # Install Python (from the official .msi of http://python.org) and pip when
  # not already installed.
  # PyPy portion based on https://github.com/wbond/asn1crypto/blob/master/appveyor.yml
  - ps:
      $env:PYTMP = "${env:TMP}\py";
      if (!(Test-Path "$env:PYTMP")) {
        New-Item -ItemType directory -Path "$env:PYTMP" | Out-Null;
      }
      if ("${env:PYTHON_ID}" -eq "pypy") {
        if (!(Test-Path "${env:PYTMP}\pypy2-v7.3.6-win64.zip")) {
          (New-Object Net.WebClient).DownloadFile('https://downloads.python.org/pypy/pypy2.7-v7.3.6-win64.zip', "${env:PYTMP}\pypy2-v7.3.6-win64.zip");
        }
        7z x -y "${env:PYTMP}\pypy2-v7.3.6-win64.zip" -oC:\ | Out-Null;
      }
      elseif ("${env:PYTHON_ID}" -eq "pypy3") {
        if (!(Test-Path "${env:PYTMP}\pypy3.7-v7.3.7-win64.zip")) {
          (New-Object Net.WebClient).DownloadFile("https://downloads.python.org/pypy/pypy3.7-v7.3.7-win64.zip", "${env:PYTMP}\pypy3.7-v7.3.7-win64.zip");
        }
        7z x -y "${env:PYTMP}\pypy3.7-v7.3.7-win64.zip" -oC:\ | Out-Null;
      }
      elseif (-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;%PYTHON%\\bin;%PATH%"
  - "SET PYEXE=%PYTHON%\\%PYTHON_EXE%.exe"

  # Check that we have the expected version and architecture for Python
  - "%PYEXE% --version"
  - "%PYEXE% -c \"import struct; print(struct.calcsize('P') * 8)\""

  # Upgrade to the latest version of pip to avoid it displaying warnings
  # about it being out of date. Do this here instead of above in
  # powershell because the annoying 'DEPRECATION:blahblahblah 2.7 blahblahblah'
  # breaks powershell.
  - "%CMD_IN_ENV% %PYEXE% -mensurepip -U --user"
  - "%CMD_IN_ENV% %PYEXE% -mpip install -U --user pip"

  - ps: "if(Test-Path(\"${env:PYTHON}\\bin\")) {ls ${env:PYTHON}\\bin;}"
  - ps: "if(Test-Path(\"${env:PYTHON}\\Scripts\")) {ls ${env:PYTHON}\\Scripts;}"

cache:
  - "%TMP%\\py\\"
  - '%LOCALAPPDATA%\pip\Cache -> appveyor.yml,setup.py'

build_script:
  # Build the compiled extension
  - "%CMD_IN_ENV% %PYEXE% -m pip install -U pip wheel"
  - "%CMD_IN_ENV% %PYEXE% -m pip install -U setuptools"
  - if not "%GWHEEL_ONLY%"=="true" %PYEXE% -m pip install -U -e .[test]

test_script:
  # Run the project tests
  - if not "%GWHEEL_ONLY%"=="true" %PYEXE% -c "import greenlet; print(greenlet, greenlet.__version__)"
  - if not "%GWHEEL_ONLY%"=="true" %PYEXE% -c "import gevent.core; print(gevent.core.loop)"
  - if not "%GWHEEL_ONLY%"=="true" %PYEXE% -c "import gevent; print(gevent.config.settings['resolver'].get_options())"
  - if not "%GWHEEL_ONLY%"=="true" %PYEXE% -c "import gevent.resolver.cares; print(gevent.resolver.cares)"
  - if not "%GWHEEL_ONLY%"=="true" %PYEXE% -c "from gevent._compat import get_clock_info; print(get_clock_info('perf_counter'))"
  - if not "%GWHEEL_ONLY%"=="true" %PYEXE% -mgevent.tests.known_failures
  - if not "%GWHEEL_ONLY%"=="true" %PYEXE% -mgevent.tests --second-chance --config known_failures.py

after_test:
  # pycparser can't be built correctly in an isolated environment.
  # See
  # https://ci.appveyor.com/project/denik/gevent/builds/23810605/job/83aw4u67artt002b#L602
  # So we violate DRY and repeate some requirements in order to use
  # --no-build-isolation
  - "%CMD_IN_ENV% %PYEXE% -m pip install wheel cython setuptools cffi twine"
  - "%CMD_IN_ENV% %PYEXE% -m pip wheel --no-build-isolation . -w dist"
  - ps: "ls dist"

artifacts:
  # Archive the generated wheel package in the ci.appveyor.com build report.
  - path: dist\gevent*whl


deploy_script:
  - ps: if ($env:APPVEYOR_REPO_TAG -eq $TRUE) { twine upload --skip-existing dist/gevent* }

deploy: on