-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathclient.yml
More file actions
522 lines (450 loc) · 19.8 KB
/
client.yml
File metadata and controls
522 lines (450 loc) · 19.8 KB
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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
trigger:
- main
variables:
PythonVersion38: '3.8'
PythonVersion39: '3.9'
PythonVersion310: '3.10'
PythonVersion311: '3.11'
PythonVersion312: '3.12'
GetPip: 'https://bootstrap.pypa.io/get-pip.py'
extends:
template: /.azure-pipelines/templates/stages/1es-redirect.yml
parameters:
stages:
- stage: Build_and_Test
displayName: 'Build and Test'
variables:
- template: /.azure-pipelines/templates/variables/image.yml
jobs:
- job: 'sdist'
displayName: 'Source Distribution'
pool:
image: $(LINUXVMIMAGE)
name: $(LINUXPOOL)
os: linux
steps:
- template: /.azure-pipelines/use-python-version.yml
parameters:
versionSpec: '$(PythonVersion38)'
- script: |
echo "Prepending PATH environment variable with directory: $HOME/.local/bin"
echo "##vso[task.prependpath]$HOME/.local/bin"
displayName: 'Prepare PATH'
- script: |
python --version
curl -sS $(GetPip) | python - --user
python -m pip --version
python -m pip install --user -r dev_requirements.txt
displayName: 'Install dependencies'
- script: python setup.py sdist
displayName: 'Build uAMQP sdist'
- script: ls ./dist
displayName: 'Check output'
- template: /.azure-pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactName: uamqp-sdist
ArtifactPath: 'dist'
- job: 'MacOS'
pool:
name: $(MACPOOL)
vmImage: $(MACVMIMAGE)
os: macOS
strategy:
matrix:
Python 3.8:
PythonBin: 'python3'
PythonVersion: '$(PythonVersion38)'
BWFilter: 'cp38-*'
Python 3.9:
PythonBin: 'python3'
PythonVersion: '$(PythonVersion39)'
BWFilter: 'cp39-*'
Python 3.10:
PythonBin: 'python3'
PythonVersion: '$(PythonVersion310)'
BWFilter: 'cp310-*'
Python 3.11:
PythonBin: 'python3'
PythonVersion: '$(PythonVersion311)'
BWFilter: 'cp311-*'
Python 3.12:
PythonBin: 'python3'
PythonVersion: '$(PythonVersion312)'
BWFilter: 'cp312-*'
variables:
MacOSXDeploymentTarget: '10.9'
OpenSSLDir: $(Agent.BuildDirectory)/openssl-macosx$(MacOSXDeploymentTarget)
PythonVersion38: '3.8'
PythonVersion39: '3.9'
PythonVersion310: '3.10'
PythonVersion311: '3.11'
PythonVersion312: '3.12'
steps:
- task: DownloadPipelineArtifact@1
displayName: 'Download OpenSSL artifact'
inputs:
artifactName: openssl-macosx$(MacOSXDeploymentTarget)
buildType: specific
buildVersionToDownload: latest
downloadPath: $(Agent.BuildDirectory)
pipeline: 119 # azure-uamqp-python - openssl
project: '29ec6040-b234-4e31-b139-33dc4287b756' # public
- script: sudo ls /Applications/
displayName: 'List All apps'
- script: sudo xcode-select --switch /Applications/Xcode_13.1.app
displayName: 'Select Xcode 13.1'
- template: /.azure-pipelines/use-python-version.yml
parameters:
versionSpec: '$(PythonVersion)'
- script: |
python -m pip --version
python -m pip install --user -r dev_requirements.txt
displayName: 'Install dependencies'
- bash: |
set -o errexit
python -m pip install cibuildwheel==2.16.2 --force
displayName: Install cibuildwheel 2.16.2
- pwsh: |
cibuildwheel --output-dir dist .
displayName: 'Build uAMQP Wheel'
env:
CIBW_PRERELEASE_PYTHONS: True
CIBW_ARCHS_MACOS: x86_64
CIBW_BUILD: $(BWFilter)
- script: ls ./dist
displayName: 'Check output'
- script: |
python -m pip install --ignore-installed ./dist/*.whl
python -m pip install pytest==6.2.4 --force
python -m pip install pytest-asyncio==0.12.0 --force
pytest tests --doctest-modules --junitxml=junit/test-results-c.xml
pytest samples --doctest-modules --junitxml=junit/test-results-live.xml
displayName: 'Run tests'
- task: PublishTestResults@2
displayName: 'Publish test results'
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/test-results-*.xml'
testResultsFormat: 'JUnit'
testRunTitle: 'MacOS Python $(PythonVersion)'
- template: /.azure-pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactName: uamqp-macosx$(MacOSXDeploymentTarget)-$(PythonVersion)-whl
ArtifactPath: 'dist'
- job: 'Windows'
pool:
name: $(WINDOWSPOOL)
image: $(WINDOWSVMIMAGE)
os: windows
variables:
VS_INSTALLER_URL: "https://aka.ms/vs/17/release/vs_enterprise.exe"
VS_INSTALLER_PATH: "$(Build.BinariesDirectory)/vs_enterprise.exe"
VS_ENTERPRISE_PATH: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise"
strategy:
matrix:
x64 Python 3.8:
PythonArchitecture: 'x64'
PythonVersion: '$(PythonVersion38)'
BWFilter: 'cp38-win_amd64'
x64 Python 3.9:
PythonArchitecture: 'x64'
PythonVersion: '$(PythonVersion39)'
BWFilter: 'cp39-win_amd64'
x64 Python 3.10:
PythonArchitecture: 'x64'
PythonVersion: '$(PythonVersion310)'
BWFilter: 'cp310-win_amd64'
x64 Python 3.11:
PythonArchitecture: 'x64'
PythonVersion: '$(PythonVersion311)'
BWFilter: 'cp311-win_amd64'
x64 Python 3.12:
PythonArchitecture: 'x64'
PythonVersion: '$(PythonVersion312)'
BWFilter: 'cp312-win_amd64'
x86 Python 3.8:
PythonArchitecture: 'x86'
PythonVersion: '$(PythonVersion38)'
BWFilter: 'cp38-win32'
x86 Python 3.9:
PythonArchitecture: 'x86'
PythonVersion: '$(PythonVersion39)'
BWFilter: 'cp39-win32'
x86 Python 3.10:
PythonArchitecture: 'x86'
PythonVersion: '$(PythonVersion310)'
BWFilter: 'cp310-win32'
x86 Python 3.11:
PythonArchitecture: 'x86'
PythonVersion: '$(PythonVersion311)'
BWFilter: 'cp311-win32'
x86 Python 3.12:
PythonArchitecture: 'x86'
PythonVersion: '$(PythonVersion312)'
BWFilter: 'cp312-win32'
steps:
- pwsh: |
Get-ChildItem -Path C:/1ESPT/Python -Recurse | % { Write-Host $_.FullName }
displayName: Dump 1ES Folder Before Build Work
- template: /.azure-pipelines/use-python-version.yml
parameters:
architecture: '$(PythonArchitecture)'
versionSpec: '$(PythonVersion)'
- powershell: |
python --version
Invoke-WebRequest -UseBasicParsing -Uri $(GetPip) | Select-Object -ExpandProperty Content | python
python -m pip --version
python -m pip install -r dev_requirements.txt
displayName: 'Install dependencies'
env:
PYTHONWARNINGS: ignore:DEPRECATION
- pwsh: |
Invoke-WebRequest "$(VS_INSTALLER_URL)" -OutFile "$(VS_INSTALLER_PATH)"
# In order of component appearance in the install command below, these are the names of the components
# as they in the VS Installer UI. (What you would do locally.)
# C# and Visual Basic Roslyn Compilers (components pane)
# C++ 2022 Redistributable Update (components pane)
# C++ CMake tools for Windows (components pane)
# MSBuild (components pane)
# MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest) (components pane)
# Native Desktop Workload (workloads pane)
$(VS_INSTALLER_PATH) --installPath $(VS_ENTERPRISE_PATH) `
--add Microsoft.VisualStudio.Component.Roslyn.Compiler `
--add Microsoft.VisualStudio.Component.VC.Redist.14.Latest `
--add Microsoft.VisualStudio.Component.VC.CMake.Project `
--add Microsoft.Component.MSBuild `
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
--add Microsoft.VisualStudio.Workload.NativeDesktop `
--quiet --wait --norestart
displayName: Install build script requirements
- script: |
call "$(VS_ENTERPRISE_PATH)\VC\Auxiliary\Build\vcvars64.bat"
python -m pip install cibuildwheel==2.16.2
displayName: Install cibuildwheel 2.16.2
- pwsh: |
cibuildwheel --output-dir dist .
displayName: 'Build uAMQP Wheel'
env:
CIBW_PRERELEASE_PYTHONS: True
CIBW_BUILD: $(BWFilter)
- script: dir dist
displayName: 'Check output'
- powershell: |
$whlfile = Get-ChildItem -Filter *.whl dist | Select-Object -First 1 -ExpandProperty Name
python -m pip install --ignore-installed ./dist/$whlfile
pytest tests --doctest-modules --junitxml=junit/test-results-c.xml
pytest samples --doctest-modules --junitxml=junit/test-results-live.xml
displayName: 'Run tests'
- task: PublishTestResults@2
displayName: 'Publish test results'
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/test-results-*.xml'
testResultsFormat: 'JUnit'
testRunTitle: 'Windows $(PythonArchitecture) Python $(PythonVersion)'
- pwsh: |
Remove-Item -Path build/ -Recurse -Force
displayName: Cleanup Compiler Artifacts
- pwsh: |
Get-ChildItem -Path C:/1ESPT/Python -Recurse | % { Write-Host $_.FullName }
displayName: Dump 1ES Folder After Build Work
- template: /.azure-pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactName: uamqp-win$(PythonArchitecture)-$(PythonVersion)-whl
ArtifactPath: 'dist'
- job: 'Linux'
pool:
name: $(LINUXPOOL)
image: $(LINUXVMIMAGE)
os: linux
strategy:
matrix:
Python 3.8:
PythonVersion: '$(PythonVersion38)'
BWFilter: 'cp38-*'
Python 3.9:
PythonVersion: '$(PythonVersion39)'
BWFilter: 'cp39-*'
Python 3.10:
PythonVersion: '$(PythonVersion310)'
BWFilter: 'cp310-*'
Python 3.11:
PythonVersion: '$(PythonVersion311)'
BWFilter: 'cp311-*'
Python 3.12:
PythonVersion: '$(PythonVersion312)'
BWFilter: 'cp312-*'
steps:
- template: /.azure-pipelines/use-python-version.yml
parameters:
versionSpec: '$(PythonVersion)'
- script: |
echo "Prepending PATH environment variable with directory: $HOME/.local/bin"
echo "##vso[task.prependpath]$HOME/.local/bin"
displayName: 'Prepare PATH'
- script: |
python --version
curl -sS $(GetPip) | python - --user
python -m pip --version
python -m pip install setuptools --force
curl -LO http://archive.ubuntu.com/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb && sudo dpkg -i libffi6_3.2.1-8_amd64.deb
python -m pip install --user -r dev_requirements.txt
displayName: 'Install dependencies'
- bash: |
set -o errexit
python -m pip install cibuildwheel==2.16.2
displayName: Install cibuildwheel 2.16.2
- pwsh: |
cibuildwheel --output-dir dist .
displayName: 'Build uAMQP Wheel'
env:
CIBW_BUILD: $(BWFilter)
CIBW_PRERELEASE_PYTHONS: True
CIBW_BEFORE_BUILD_LINUX: bash utils/install_openssl.sh
CIBW_ENVIRONMENT_LINUX: OPENSSL_ROOT_DIR="/opt/pyca/cryptography/openssl" LIBRARY_PATH="/opt/pyca/cryptography/openssl/lib" CPATH="/opt/pyca/cryptography/openssl/include" CIBW_ARCHS_LINUX="x86_64"
- script: ls ./dist
displayName: 'Check output'
- script: |
python -m pip install --user --ignore-installed ./dist/*.whl
pytest tests --doctest-modules --junitxml=junit/test-results-c.xml
pytest samples --doctest-modules --junitxml=junit/test-results-live.xml
displayName: 'Run tests'
- task: PublishTestResults@2
displayName: 'Publish test results'
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/test-results-*.xml'
testResultsFormat: 'JUnit'
testRunTitle: 'Linux Python $(PythonVersion)'
- template: /.azure-pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactName: uamqp-linux-$(PythonVersion)-whl
ArtifactPath: 'dist'
- job: 'ManyLinux'
condition: ne(variables['System.TeamProject'], 'public')
pool:
name: $(LINUXPOOL)
image: $(LINUXVMIMAGE)
os: 'linux'
strategy:
matrix:
Python38-manylinux2014:
PythonVersion: '$(PythonVersion38)'
Platform: 'manylinux2014_x86_64'
BWFilter: 'cp38-*'
Python39-manylinux2014:
PythonVersion: '$(PythonVersion39)'
Platform: 'manylinux2014_x86_64'
BWFilter: 'cp39-*'
Python310-manylinux2014:
PythonVersion: '$(PythonVersion310)'
Platform: 'manylinux2014_x86_64'
BWFilter: 'cp310-*'
Python311-manylinux2014:
PythonVersion: '$(PythonVersion311)'
Platform: 'manylinux2014_x86_64'
BWFilter: 'cp311-*'
Python312-manylinux2014:
PythonVersion: '$(PythonVersion312)'
Platform: 'manylinux2014_x86_64'
BWFilter: 'cp312-*'
steps:
- template: /.azure-pipelines/use-python-version.yml
parameters:
versionSpec: '$(PythonVersion)'
- script: |
echo "Prepending PATH environment variable with directory: $HOME/.local/bin"
echo "##vso[task.prependpath]$HOME/.local/bin"
displayName: 'Prepare PATH'
- script: |
python --version
curl -sS $(GetPip) | python - --user
python -m pip --version
python -m pip install setuptools --force
curl -LO http://archive.ubuntu.com/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb && sudo dpkg -i libffi6_3.2.1-8_amd64.deb
python -m pip install --user -r dev_requirements.txt
displayName: 'Install dependencies'
- bash: |
set -o errexit
python -m pip install cibuildwheel==2.16.2
displayName: Install cibuildwheel 2.16.2
- pwsh: |
cibuildwheel --output-dir dist .
displayName: 'Build uAMQP Wheel'
env:
CIBW_BUILD: $(BWFilter)
CIBW_PRERELEASE_PYTHONS: True
CIBW_BEFORE_BUILD_LINUX: bash utils/install_openssl.sh
CIBW_ENVIRONMENT_LINUX: OPENSSL_ROOT_DIR="/opt/pyca/cryptography/openssl" LIBRARY_PATH="/opt/pyca/cryptography/openssl/lib" CPATH="/opt/pyca/cryptography/openssl/include" CIBW_ARCHS_LINUX="x86_64"
CIBW_MANYLINUX_*_IMAGE: manylinux2014
- script: ls ./dist
displayName: 'Check output'
- script: |
python -m pip install --user --ignore-installed ./dist/*.whl
pytest tests --doctest-modules --junitxml=junit/test-results-c.xml
pytest samples --doctest-modules --junitxml=junit/test-results-live.xml
displayName: 'Run tests'
- template: /.azure-pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactName: 'uamqp-$(Platform)-$(PythonVersion)-x64-whl'
ArtifactPath: 'dist'
- task: PublishTestResults@2
displayName: 'Publish test results'
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/test-results-*.xml'
testResultsFormat: 'JUnit'
testRunTitle: 'ManyLinux2014 Python $(PythonVersion)'
- stage: Release
dependsOn: Build_and_Test
jobs:
- deployment: Publish
environment: 'package-publish'
pool:
name: azsdk-pool-mms-ubuntu-2004-general
image: azsdk-pool-mms-ubuntu-2004-1espt
os: linux
strategy:
runOnce:
deploy:
steps:
- checkout: self
- template: /.azure-pipelines/templates/steps/download-targeted-artifacts.yml
parameters:
ArtifactList:
- 'uamqp-sdist'
- 'uamqp-linux-3.8-whl'
- 'uamqp-linux-3.9-whl'
- 'uamqp-linux-3.10-whl'
- 'uamqp-linux-3.11-whl'
- 'uamqp-linux-3.12-whl'
- 'uamqp-macosx10.9-3.8-whl'
- 'uamqp-macosx10.9-3.9-whl'
- 'uamqp-macosx10.9-3.10-whl'
- 'uamqp-macosx10.9-3.11-whl'
- 'uamqp-macosx10.9-3.12-whl'
- 'uamqp-manylinux2014_x86_64-3.8-x64-whl'
- 'uamqp-manylinux2014_x86_64-3.9-x64-whl'
- 'uamqp-manylinux2014_x86_64-3.10-x64-whl'
- 'uamqp-manylinux2014_x86_64-3.11-x64-whl'
- 'uamqp-manylinux2014_x86_64-3.12-x64-whl'
- 'uamqp-winx64-3.8-whl'
- 'uamqp-winx64-3.9-whl'
- 'uamqp-winx64-3.10-whl'
- 'uamqp-winx64-3.11-whl'
- 'uamqp-winx64-3.12-whl'
- 'uamqp-winx86-3.8-whl'
- 'uamqp-winx86-3.9-whl'
- 'uamqp-winx86-3.10-whl'
- 'uamqp-winx86-3.11-whl'
- 'uamqp-winx86-3.12-whl'
- pwsh: |
Get-ChildItem "$(Pipeline.Workspace)" -Recurse -Force
| Where-Object { ($_.Name -like "*.tar.gz" -or $_.Name -like "*.whl") } `
| % { Write-Host $_.FullName }
Write-Host "Copying artifacts into staging directory"
Get-ChildItem "$(Pipeline.Workspace)" -Recurse -Force `
| Where-Object { ($_.Name -like "*.tar.gz" -or $_.Name -like "*.whl") } `
| Copy-Item -Destination "$(Build.ArtifactStagingDirectory)"
Get-ChildItem "$(Build.ArtifactStagingDirectory)" -Recurse -Force | % { Write-Host $_.FullName }
displayName: Move artifact to $(Build.ArtifactStagingDirectory)