File: appveyor.yml

package info (click to toggle)
pymssql 2.1.4+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 952 kB
  • sloc: python: 2,872; sh: 240; makefile: 148; ansic: 7
file content (280 lines) | stat: -rw-r--r-- 8,499 bytes parent folder | download | duplicates (3)
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# version format
version: "{build}"

skip_tags: false

clone_depth: 20

os: Visual Studio 2015

environment:

  global:
    # 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 intepreter
    # See: http://stackoverflow.com/a/13751649/163740
    APPVEYOR_RDP_PASSWORD: "k7H0kTHbum1C"
    CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\dev\\appveyor\\run_with_env.cmd"
    FREETDS_VER: 1.00.78
    FREETDS_BASE_URL: "https://ci.appveyor.com/api/projects/FreeTDS/freetds/artifacts"
    FREETDS_BRANCH: "master"
    FREETDS_JOB: "Environment%%3A%%20PLAT%%3DWin%PYTHON_ARCH%%%2C%%20WIDTH%%3D%PYTHON_ARCH%%%2C%%20VS_VERSION%%3D%VS_VER%%%2C%%20TDSVER%%3D%TDS_VER%"
    FREETDS_URL: '"%FREETDS_BASE_URL%/vs%VS_VER%_%PYTHON_ARCH%-%FREETDS_BRANCH%_withoutssl.zip?branch=%FREETDS_BRANCH%&job=%FREETDS_JOB%"'

    TEST_PYPI_USERNAME:
        secure: hDyq40wCvSUhkSlRUe9ecw==

    TEST_PYPI_PASSWORD:
        secure: ve8I3ZkQZBOdEqF59CLt7w==

    PYPI_USERNAME:
      secure: hDyq40wCvSUhkSlRUe9ecw==

    PYPI_PASSWORD:
      secure: slUdLrTWmxhTw+QN/JcmAA==

  matrix:

    - PYTHON: "C:\\Python27"
      PYTHON_VERSION: "2.7.14"
      PYTHON_ARCH: "32"
      ARCH: x86
      VS_VER: "2008"
      TDS_VER: "7.0"
      INSTANCENAME: "SQL2008R2SP2"

    - PYTHON: "C:\\Python34"
      PYTHON_VERSION: "3.4.7"
      PYTHON_ARCH: "32"
      ARCH: x86
      VS_VER: "2010"
      TDS_VER: "7.1"
      INSTANCENAME: "SQL2008R2SP2"

    - PYTHON: "C:\\Python35"
      PYTHON_VERSION: "3.5.4"
      PYTHON_ARCH: "32"
      ARCH: x86
      VS_VER: "2015"
      TDS_VER: "7.2"
      INSTANCENAME: "SQL2008R2SP2"

    - PYTHON: "C:\\Python36"
      PYTHON_VERSION: "3.6.4"
      PYTHON_ARCH: "32"
      ARCH: x86
      VS_VER: "2015"
      TDS_VER: "7.2"
      INSTANCENAME: "SQL2008R2SP2"

    - PYTHON: "C:\\Python37"
      PYTHON_VERSION: "3.7.0"
      PYTHON_ARCH: "32"
      ARCH: x86
      VS_VER: "2015"
      TDS_VER: "7.2"
      INSTANCENAME: "SQL2008R2SP2"

    - PYTHON: "C:\\Python27-x64"
      PYTHON_VERSION: "2.7.14"
      PYTHON_ARCH: "64"
      ARCH: x86_64
      VS_VER: "2010"
      TDS_VER: "7.2"
      INSTANCENAME: "SQL2008R2SP2"

    - PYTHON: "C:\\Python34-x64"
      PYTHON_VERSION: "3.4.7"
      PYTHON_ARCH: "64"
      ARCH: x86_64
      VS_VER: "2010"
      TDS_VER: "7.2"
      INSTANCENAME: "SQL2008R2SP2"

    - PYTHON: "C:\\Python35-x64"
      PYTHON_VERSION: "3.5.4"
      PYTHON_ARCH: "64"
      ARCH: x86_64
      VS_VER: "2015"
      TDS_VER: "7.3"
      INSTANCENAME: "SQL2008R2SP2"

    - PYTHON: "C:\\Python36-x64"
      PYTHON_VERSION: "3.6.4"
      PYTHON_ARCH: "64"
      ARCH: x86_64
      VS_VER: "2015"
      TDS_VER: "7.3"
      INSTANCENAME: "SQL2008R2SP2"

    - PYTHON: "C:\\Python37-x64"
      PYTHON_VERSION: "3.7.0"
      PYTHON_ARCH: "64"
      ARCH: x86_64
      VS_VER: "2015"
      TDS_VER: "7.3"
      INSTANCENAME: "SQL2008R2SP2"

    - PYTHON: "C:\\Python27"
      PYTHON_VERSION: "2.7.14"
      PYTHON_ARCH: "32"
      ARCH: x86
      VS_VER: "2008"
      TDS_VER: "7.0"
      INSTANCENAME: "SQL2012SP1"

    - PYTHON: "C:\\Python34"
      PYTHON_VERSION: "3.4.7"
      PYTHON_ARCH: "32"
      ARCH: x86
      VS_VER: "2010"
      TDS_VER: "7.1"
      INSTANCENAME: "SQL2012SP1"

    - PYTHON: "C:\\Python35"
      PYTHON_VERSION: "3.5.4"
      PYTHON_ARCH: "32"
      ARCH: x86
      VS_VER: "2015"
      TDS_VER: "7.2"
      INSTANCENAME: "SQL2012SP1"

    - PYTHON: "C:\\Python36"
      PYTHON_VERSION: "3.6.4"
      PYTHON_ARCH: "32"
      ARCH: x86
      VS_VER: "2015"
      TDS_VER: "7.2"
      INSTANCENAME: "SQL2012SP1"

    - PYTHON: "C:\\Python37"
      PYTHON_VERSION: "3.7.0"
      PYTHON_ARCH: "32"
      ARCH: x86
      VS_VER: "2015"
      TDS_VER: "7.2"
      INSTANCENAME: "SQL2012SP1"

    - PYTHON: "C:\\Python27-x64"
      PYTHON_VERSION: "2.7.14"
      PYTHON_ARCH: "64"
      ARCH: x86_64
      VS_VER: "2010"
      TDS_VER: "7.2"
      INSTANCENAME: "SQL2012SP1"

    - PYTHON: "C:\\Python34-x64"
      PYTHON_VERSION: "3.4.7"
      PYTHON_ARCH: "64"
      ARCH: x86_64
      VS_VER: "2010"
      TDS_VER: "7.2"
      INSTANCENAME: "SQL2012SP1"

    - PYTHON: "C:\\Python35-x64"
      PYTHON_VERSION: "3.5.4"
      PYTHON_ARCH: "64"
      ARCH: x86_64
      VS_VER: "2015"
      TDS_VER: "7.3"
      INSTANCENAME: "SQL2012SP1"

    - PYTHON: "C:\\Python36-x64"
      PYTHON_VERSION: "3.6.4"
      PYTHON_ARCH: "64"
      ARCH: x86_64
      VS_VER: "2015"
      TDS_VER: "7.3"
      INSTANCENAME: "SQL2012SP1"

    - PYTHON: "C:\\Python37-x64"
      PYTHON_VERSION: "3.7.0"
      PYTHON_ARCH: "64"
      ARCH: x86_64
      VS_VER: "2015"
      TDS_VER: "7.3"
      INSTANCENAME: "SQL2012SP1"

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." }

  # Install Python (from the official .msi of http://python.org) and pip when
  # not already installed.
  - "powershell dev\\appveyor\\install.ps1"

  # Prepend current Python and scripts dirs 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%"

  # Upgrade to the latest version of pip to avoid it displaying warnings
  # about it being out of date.
  - "python -m pip install --upgrade pip"

  # 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
  - "%CMD_IN_ENV% pip install -r dev\\dev-requirements.pip"
  #- cmd: if %PYTHON_VERSION:~0,1% == 3 ( %CMD_IN_ENV% pip install gevent==1.1.b6 ) else ( %CMD_IN_ENV% pip install gevent )
  - "%CMD_IN_ENV% pip install gevent"

before_build:
  # win-iconv
  - "powershell dev\\appveyor\\install-win-iconv.ps1"
  # FreeTDS
  - "rmdir /s /q freetds\\vs%VS_VER%_%PYTHON_ARCH% || cmd /c \"exit /b 0\""
  - curl -L -o vs%VS_VER%_%PYTHON_ARCH%-%FREETDS_BRANCH%_withoutssl.zip %FREETDS_URL%
  - 7z x -ofreetds vs%VS_VER%_%PYTHON_ARCH%-%FREETDS_BRANCH%_withoutssl.zip
  - mv freetds/vs%VS_VER%_%PYTHON_ARCH%-%FREETDS_BRANCH% freetds/vs%VS_VER%_%PYTHON_ARCH%

build_script:
  - "%CMD_IN_ENV% python setup.py install"

before_test:
  - copy dev\appveyor\tests.cfg tests\
  # Add relevant OpenSSL DLLs dir to PATH envvar
  - ps: |
      if ($env:PYTHON_ARCH -eq 32) {
        $env:PATH = $env:APPVEYOR_BUILD_FOLDER + "\openssl\bin;" + $env:PATH
      } else {
        $env:PATH = $env:APPVEYOR_BUILD_FOLDER + "\openssl\bin64;" + $env:PATH
      }
  # Add relevant FreeTDS DLLs dir to PATH envvar
  - set PATH=%CD%\freetds\vs%VS_VER%_%PYTHON_ARCH%\lib;%PATH%
  # Start, reconfigure and restart SQL Server
  - net start MSSQL$%INSTANCENAME%
  - "powershell dev\\appveyor\\sql-server-activate-tcp-fixed-port.ps1"

test_script:
  - "py.test --junitxml=junit.xml"

after_test:
  # Preserve tests results JUnit XML file
  - ps: |
      $url = "https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)"
      $file = '.\junit.xml'
      (New-Object 'System.Net.WebClient').UploadFile($url, (Resolve-Path $file))
  # If tests are successful, create binary packages for the project.
  - "%CMD_IN_ENV% python setup.py bdist_wheel"

artifacts:
  - path: dist\*.whl

on_success:
  ps: |
    if ($env:APPVEYOR_REPO_TAG -eq "true" -or $env:APPVEYOR_REPO_TAG -eq "True") {
      If ($env:INSTANCENAME -eq "SQL2012SP1") {
        pip install twine --upgrade
        # twine upload -u $env:TEST_PYPI_USERNAME -p $env:TEST_PYPI_PASSWORD --config-file dev\appveyor\pypirc -r testpypi $env:APPVEYOR_BUILD_FOLDER\dist\*.whl
        twine upload -u $env:PYPI_USERNAME -p $env:PYPI_PASSWORD  $env:APPVEYOR_BUILD_FOLDER\dist\*.whl
      }
    }