forked from data61/clkhash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azurePipeline.yml
121 lines (115 loc) · 3.44 KB
/
azurePipeline.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
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
trigger:
branches:
include:
- master
tags:
include:
- '*'
pr:
branches:
include:
- '*'
stages:
- stage: static_checks
displayName: Static Checks
dependsOn: []
jobs:
- job:
displayName: 'Typechecking'
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
- script: |
python -m pip install -U mypy==0.730
mypy clkhash --ignore-missing-imports --no-implicit-optional --disallow-untyped-calls
displayName: 'mypy (pinned)'
- script: |
python -m pip install -U mypy
mypy clkhash --ignore-missing-imports --no-implicit-optional --disallow-untyped-calls
displayName: 'mypy (latest)'
continueOnError: true
- job:
displayName: "Check Git Tags"
steps:
# In this step, if this build is triggered by a tag, it will add a tag 'Automated' to the current build.
- script: echo "##vso[build.addbuildtag]Automated"
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
- stage: build_and_test
displayName: Build and Test
dependsOn: []
jobs:
- template: .azurePipeline/wholeBuild.yml # Template reference
parameters:
pythonVersions: ['3.8', '2.7']
operatingSystems: ['ubuntu-18.04']
architectures: ['x64']
fullTests: True
- template: .azurePipeline/wholeBuild.yml # Template reference
parameters:
pythonVersions: ['3.7']
operatingSystems: ['ubuntu-18.04', 'macos-10.14', 'vs2017-win2016']
architectures: ['x64']
fullTests: True
- template: .azurePipeline/wholeBuild.yml # Template reference
parameters:
pythonVersions: ['3.7', '3.6', '3.5', '2.7']
operatingSystems: ['vs2017-win2016']
architectures: ['x86']
- template: .azurePipeline/wholeBuild.yml # Template reference
parameters:
pythonVersions: ['3.6', '3.5', '2.7']
operatingSystems: ['vs2017-win2016']
architectures: ['x64']
- template: .azurePipeline/wholeBuild.yml # Template reference
parameters:
pythonVersions: ['3.8', '3.6', '3.5', '2.7']
operatingSystems: ['macos-10.14']
architectures: ['x64']
- template: .azurePipeline/wholeBuild.yml # Template reference
parameters:
pythonVersions: ['3.6', '3.5', 'pypy3', 'pypy2']
operatingSystems: ['ubuntu-18.04']
architectures: ['x64']
- job:
displayName: 'Package Source Distribution'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
displayName: 'Init Python'
- script: |
python -m pip install -U pip
- script: python setup.py sdist
displayName: 'Package sdist'
- task: PublishPipelineArtifact@1
inputs:
artifact: 'sdist'
targetPath: 'dist/'
- stage: package
displayName: Package Artifacts
dependsOn: ['build_and_test']
jobs:
- job:
displayName: 'Package Artifacts'
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: DownloadPipelineArtifact@2
inputs:
path: $(Pipeline.Workspace)
- script: |
cd $(Pipeline.Workspace)
mkdir artifacts
mv vs2017-win2016-3.7-x64/*.exe artifacts
mv vs2017-win2016-3.7-x86/*.exe artifacts
mv ubuntu-18.04-3.7-x64/*.whl artifacts
mv sdist/* artifacts
ls artifacts
displayName: 'List Artifacts'
- task: PublishPipelineArtifact@1
inputs:
artifact: 'release'
targetPath: '$(Pipeline.Workspace)/artifacts'