-
Notifications
You must be signed in to change notification settings - Fork 38
/
azure-pipelines.yml
255 lines (207 loc) · 6.53 KB
/
azure-pipelines.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
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
---
trigger:
# Already default, but made explicit here
branches:
include: ["*"]
# Ensure Azure triggers a build on a new tag
# We use these for GitHub releases
tags:
include: ["*"]
paths:
# Do not trigger a build on changes at these paths
exclude:
- docs/*
- .gitignore
- LICENSE.txt
- README.md
jobs:
# -----------------------------------------------------------------------
#
# Test
#
# -----------------------------------------------------------------------
- job: Ubuntu
pool:
vmImage: "ubuntu-20.04" # Focal
strategy:
matrix:
Py35-Rez:
python.version: "3.5"
rez.project: "rez"
Py35-BleedingRez:
python.version: "3.5"
rez.project: "bleeding-rez"
Py36-Rez:
python.version: "3.6"
rez.project: "rez"
Py36-BleedingRez:
python.version: "3.6"
rez.project: "bleeding-rez"
Py37-Rez:
python.version: "3.7"
rez.project: "rez"
Py37-BleedingRez:
python.version: "3.7"
rez.project: "bleeding-rez"
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "$(python.version)"
displayName: "Use Python $(python.version)"
- script: |
git clone https://github.com/nerdvegas/rez.git rez-src
cd rez-src
sudo pip install .
condition: eq(variables['rez.project'], 'rez')
displayName: "Install rez (pip for API)"
- script: |
sudo pip install bleeding-rez
condition: eq(variables['rez.project'], 'bleeding-rez')
displayName: "Install bleeding-rez"
- script: |
sudo apt-get install python-pyside
sudo python -c "from PySide import QtCore;print(QtCore.__version__)"
condition: startsWith(variables['python.version'], '2.')
displayName: "Install PySide"
- script: |
sudo apt-get install python3-pyside2.qtcore \
python3-pyside2.qtgui \
python3-pyside2.qtwidgets \
python3-pyside2.qtsvg
sudo pip install pyside2
sudo python -c "from PySide2 import QtCore;print(QtCore.__version__)"
condition: startsWith(variables['python.version'], '3.')
displayName: "Install PySide2"
- script: |
sudo pip install nose
displayName: "Install test tools"
- script: |
sudo pip install . --no-deps
displayName: "Install allzpark"
- script: |
sudo apt-get install xvfb
displayName: "Setup Xvfb"
- script: |
export DISPLAY=:99
xvfb-run sudo nosetests
displayName: "Run tests"
- job: MacOS
pool:
vmImage: "macOS-10.15"
strategy:
matrix:
Py37-Rez:
python.version: "3.7"
rez.project: "rez"
Py37-BleedingRez:
python.version: "3.7"
rez.project: "bleeding-rez"
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "$(python.version)"
displayName: "Use Python $(python.version)"
- script: |
git clone https://github.com/nerdvegas/rez.git rez-src
cd rez-src
pip install .
condition: eq(variables['rez.project'], 'rez')
displayName: "Install rez (pip for API)"
- script: |
pip install bleeding-rez
condition: eq(variables['rez.project'], 'bleeding-rez')
displayName: "Install bleeding-rez"
- script: |
brew tap cartr/qt4
brew install qt@4
pip install PySide
condition: startsWith(variables['python.version'], '2.')
displayName: "Install PySide"
- script: |
pip install PySide2
condition: startsWith(variables['python.version'], '3.')
displayName: "Install PySide2"
- script: |
pip install nose
displayName: "Install test tools"
- script: |
pip install . --no-deps
displayName: "Install allzpark"
- script: |
nosetests
displayName: "Run tests"
- job: Windows
pool:
vmImage: windows-latest
strategy:
matrix:
Py37-Rez:
python.version: "3.7"
rez.project: "rez"
Py37-BleedingRez:
python.version: "3.7"
rez.project: "bleeding-rez"
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "$(python.version)"
displayName: "Use Python $(python.version)"
- script: |
git clone https://github.com/nerdvegas/rez.git rez-src
cd rez-src
pip install .
condition: eq(variables['rez.project'], 'rez')
displayName: "Install rez (pip for API)"
- script: |
pip install bleeding-rez
condition: eq(variables['rez.project'], 'bleeding-rez')
displayName: "Install bleeding-rez"
- script: |
pip install PySide
condition: startsWith(variables['python.version'], '2.')
displayName: "Install PySide"
- script: |
pip install PySide2
condition: startsWith(variables['python.version'], '3.')
displayName: "Install PySide2"
- script: |
pip install nose
displayName: "Install test tools"
- script: |
pip install . --no-deps
displayName: "Install allzpark"
- script: |
nosetests
displayName: "Run tests"
# -----------------------------------------------------------------------
#
# Deploy to PyPI
#
# -----------------------------------------------------------------------
- job: Deploy
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
pool:
vmImage: "ubuntu-latest"
strategy:
matrix:
Python37:
python.version: "3.7"
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "$(python.version)"
displayName: "Use Python $(python.version)"
- script: |
pip install wheel twine
python setup.py sdist bdist_wheel
echo [distutils] > ~/.pypirc
echo index-servers=pypi >> ~/.pypirc
echo [pypi] >> ~/.pypirc
echo username=$_LOGIN >> ~/.pypirc
echo password=$_PASSWORD >> ~/.pypirc
twine upload dist/*
displayName: "Deploy to PyPI"
# Decrypt secret variables provided by Azure web console
env:
_LOGIN: $(PYPI_LOGIN)
_PASSWORD: $(PYPI_PASSWORD)