forked from Azure/azure-multiapi-storage-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipeline.yml
75 lines (66 loc) · 1.74 KB
/
azure-pipeline.yml
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
resources:
- repo: self
trigger:
batch: true
branches:
include:
- '*'
pr:
branches:
include:
- '*'
jobs:
- job: TestInstall
timeoutInMinutes: 10
pool:
name: 'pool-ubuntu-2004'
strategy:
matrix:
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'
Python310:
python.version: '3.10'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python $(python.version)'
inputs:
versionSpec: '$(python.version)'
- bash: |
set -ev
pip install -e .
displayName: Install from Source
- job: BuildPythonWheel
condition: succeeded()
pool:
name: 'pool-ubuntu-2004'
steps:
- task: UsePythonVersion@0
displayName: Use Python 3.7
inputs:
versionSpec: 3.7
- bash: |
set -ev
: "${BUILD_STAGINGDIRECTORY:?BUILD_STAGINGDIRECTORY environment variable not set}"
echo "Build knack"
pip install -U pip setuptools wheel
python setup.py bdist_wheel -d "${BUILD_STAGINGDIRECTORY}"
python setup.py sdist -d "${BUILD_STAGINGDIRECTORY}"
displayName: Build Wheel
- task: PublishPipelineArtifact@0
displayName: 'Publish Artifact: pypi'
inputs:
TargetPath: $(Build.ArtifactStagingDirectory)
ArtifactName: pypi
- task: DownloadPipelineArtifact@1
displayName: 'Download PyPI Packages'
inputs:
TargetPath: '$(Build.ArtifactStagingDirectory)/pypi'
artifactName: pypi
- bash: |
set -ev
cd $BUILD_ARTIFACTSTAGINGDIRECTORY/pypi
pwd
ls -la
displayName: Test Build Wheel