-
Notifications
You must be signed in to change notification settings - Fork 145
/
pipelines.yml
357 lines (312 loc) · 11 KB
/
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
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
# Conda package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/anaconda
trigger:
tags:
include:
- '*'
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight build
branches:
include:
- master
always: true
variables:
system.debug: true
system.log: true
stages:
- stage: Analyze
dependsOn: []
jobs:
- job: spelling
variables:
image: ubuntu-latest
pool:
vmImage: ubuntu-latest
steps:
- template: templates/install.yml
parameters:
python_version: 3
conda_packages: 'hunspell'
- bash: |
source activate myEnvironment
pip install pyspelling
displayName: Install pip packages
- bash: |
wget -O en_US.aff https://cgit.freedesktop.org/libreoffice/dictionaries/plain/en/en_US.aff?id=a4473e06b56bfe35187e302754f6baaa8d75e54f
wget -O en_US.dic https://cgit.freedesktop.org/libreoffice/dictionaries/plain/en/en_US.dic?id=a4473e06b56bfe35187e302754f6baaa8d75e54f
displayName: Obtain dictionaries
- bash: |
source activate myEnvironment
pyspelling
displayName: Check spelling
- job: lint
variables:
image: ubuntu-latest
pool:
vmImage: ubuntu-latest
steps:
- template: templates/install.yml
parameters:
python_version: 3
conda_packages: 'numpy'
- bash: |
source activate myEnvironment
pip install pylint
displayName: Install pip packages
- bash: |
source activate myEnvironment
pylint setup.py
displayName: Check lint
- job: style
variables:
image: ubuntu-latest
pool:
vmImage: ubuntu-latest
steps:
- template: templates/install.yml
parameters:
python_version: 3
conda_packages: 'numpy'
- bash: |
source activate myEnvironment
pip install flake8
displayName: Install pip packages
- bash: |
source activate myEnvironment
flake8 setup.py
displayName: Check style
- stage: Test
dependsOn: []
jobs:
- job:
strategy:
matrix:
linux-py3k-petsc:
image: ubuntu-latest
python_version: 3
conda_packages: 'numpy scipy matplotlib-base future packaging mpich mpi4py petsc4py mayavi "gmsh <4.0|>=4.5.2"'
FIPY_SOLVERS: petsc
MPIRUN:
linux-py3k-petsc-parallel:
image: ubuntu-latest
python_version: 3
conda_packages: 'numpy scipy matplotlib-base future packaging mpich mpi4py petsc4py mayavi "gmsh <4.0|>=4.5.2"'
FIPY_SOLVERS: petsc
MPIRUN: 'mpirun -np 2'
linux-py3k-scipy:
image: ubuntu-latest
python_version: 3
conda_packages: 'numpy scipy matplotlib-base future packaging mayavi "gmsh <4.0|>=4.5.2"'
FIPY_SOLVERS: scipy
MPIRUN:
linux-py3k-trilinos:
image: ubuntu-latest
python_version: 3
conda_packages: 'numpy scipy matplotlib-base future packaging mpich mpi4py pytrilinos mayavi "gmsh <4.0|>=4.5.2"'
FIPY_SOLVERS: trilinos
MPIRUN:
linux-py3k-trilinos-parallel:
image: ubuntu-latest
python_version: 3
conda_packages: 'numpy scipy matplotlib-base future packaging mpich mpi4py pytrilinos mayavi "gmsh <4.0|>=4.5.2"'
FIPY_SOLVERS: trilinos
MPIRUN: 'mpirun -np 2'
macos-py27-pysparse:
image: macos-latest
python_version: 2.7
conda_packages: 'numpy scipy matplotlib-base future packaging pysparse mayavi "traitsui<7.0.0" "gmsh<4.0"'
FIPY_SOLVERS: pysparse
MPIRUN:
macos-py3k-petsc:
image: macos-latest
python_version: 3
conda_packages: 'numpy scipy matplotlib-base future packaging mpich mpi4py petsc4py mayavi "gmsh <4.0|>=4.5.2"'
FIPY_SOLVERS: petsc
MPIRUN:
macos-py3k-petsc-parallel:
image: macos-latest
python_version: 3
conda_packages: 'numpy scipy matplotlib-base future packaging mpich mpi4py petsc4py mayavi "gmsh <4.0|>=4.5.2"'
FIPY_SOLVERS: petsc
MPIRUN: 'mpirun -np 2'
macos-py3k-scipy:
image: macos-latest
python_version: 3
conda_packages: 'numpy scipy matplotlib-base future packaging mayavi "gmsh <4.0|>=4.5.2"'
FIPY_SOLVERS: scipy
MPIRUN:
macos-py3k-trilinos:
image: macos-latest
python_version: 3
conda_packages: 'numpy scipy matplotlib-base future packaging mpich mpi4py pytrilinos mayavi "gmsh <4.0|>=4.5.2"'
FIPY_SOLVERS: trilinos
MPIRUN:
macos-py3k-trilinos-parallel:
image: macos-latest
python_version: 3
conda_packages: 'numpy scipy matplotlib-base future packaging mpich mpi4py pytrilinos mayavi "gmsh <4.0|>=4.5.2"'
FIPY_SOLVERS: trilinos
MPIRUN: 'mpirun -np 2'
windows-py3k-scipy:
image: windows-latest
python_version: 3
conda_packages: 'numpy scipy matplotlib-base future packaging mayavi "gmsh <4.0|>=4.5.2"'
FIPY_SOLVERS: scipy
MPIRUN:
pool:
vmImage: $(image)
steps:
- template: templates/install.yml
parameters:
python_version: $(python_version)
conda_packages: $(conda_packages)
- bash: |
conda env export --name myEnvironment
displayName: Environment
- bash: |
source activate myEnvironment
python setup.py install
$MPIRUN python setup.py test --deprecation-errors
env:
FIPY_SOLVERS: $(FIPY_SOLVERS)
MPIRUN: $(MPIRUN)
OMP_NUM_THREADS: 1
QT_QPA_PLATFORM: offscreen
displayName: Test
- stage: Package
dependsOn: []
jobs:
- job: docs
variables:
image: ubuntu-latest
pool:
vmImage: ubuntu-latest
steps:
- template: templates/install.yml
parameters:
python_version: 3
conda_packages: 'numpy scipy matplotlib future packaging mpich mpi4py petsc4py mayavi "gmsh <4.0|>=4.5.2" sphinx pandas imagemagick'
- bash: |
source activate myEnvironment
pip install sphinxcontrib-bibtex
pip install numpydoc
displayName: Install pip packages
- bash: |
sudo apt-get --yes update
sudo apt-get --yes install texlive-latex-base
sudo apt-get --yes install texlive-fonts-recommended
sudo apt-get --yes install texlive-fonts-extra
sudo apt-get --yes install texlive-latex-extra
sudo apt-get --yes install texlive-science
sudo apt-get --yes install texlive-extra-utils
displayName: Install LaTeX
- bash: |
conda env export --name myEnvironment
displayName: Environment
- bash: |
source activate myEnvironment
export ETS_TOOLKIT=null
python setup.py build_docs --html
mkdir -p dist/
FIPY_VERSION=`python setup.py --version`
tar -czf dist/html-${FIPY_VERSION}.tar.gz -C documentation/_build html
displayName: HTML
- bash: |
source activate myEnvironment
export ETS_TOOLKIT=null
python setup.py build_docs --pdf
mkdir -p dist/
FIPY_VERSION=`python setup.py --version`
cp documentation/_build/latex/fipy.pdf dist/FiPy-${FIPY_VERSION}.pdf
displayName: PDF
- publish: $(System.DefaultWorkingDirectory)/dist/
artifact: dist-docs
- job:
strategy:
matrix:
unix:
image: ubuntu-latest
python_version: 3.10
conda_packages: 'numpy scipy matplotlib-base future packaging mpich mpi4py petsc4py mayavi "gmsh <4.0|>=4.5.2"'
FIPY_SOLVERS: petsc
MPIRUN:
windows:
image: windows-latest
python_version: 3.10
conda_packages: 'numpy scipy matplotlib-base future packaging mayavi "gmsh <4.0|>=4.5.2"'
FIPY_SOLVERS: scipy
MPIRUN:
pool:
vmImage: $(image)
steps:
- template: templates/install.yml
parameters:
python_version: $(python_version)
conda_packages: $(conda_packages)
- bash: git fetch origin --tags --force
displayName: Fetch tags
- bash: |
source activate myEnvironment
python -m pip install --upgrade setuptools wheel
python setup.py bdist_wheel
python3 -m pip install check-wheel-contents
check-wheel-contents dist/*.whl
displayName: Build wheel
condition: startsWith(variables.image, 'ubuntu')
- bash: |
conda env export --name myEnvironment
displayName: Environment
- bash: |
source activate myEnvironment
python setup.py release --unix
displayName: Build source
condition: startsWith(variables.image, 'ubuntu')
- bash: |
source activate myEnvironment
python setup.py release --windows
displayName: Build source
condition: startsWith(variables.image, 'windows')
- bash: |
mamba create --quiet --name wheelEnvironment --channel conda-forge python=3.10 mamba
source activate wheelEnvironment
mkdir tmp
cd tmp
python -m pip install ../dist/*.whl
FIPY_SOLVERS=scipy python -c "import fipy; fipy.test()"
env:
QT_QPA_PLATFORM: offscreen
displayName: Test wheel
condition: startsWith(variables.image, 'ubuntu')
- bash: |
source activate myEnvironment
FIPY_VERSION=`python setup.py --version`
mkdir tmp
cd tmp
cp ../dist/FiPy-${FIPY_VERSION}.tar.gz .
tar zxvf FiPy-${FIPY_VERSION}.tar.gz
cd FiPy-${FIPY_VERSION}
python setup.py install
cd ..
python -c "import fipy; fipy.test()"
env:
QT_QPA_PLATFORM: offscreen
displayName: Test source
condition: startsWith(variables.image, 'ubuntu')
- bash: |
source activate myEnvironment
FIPY_VERSION=`python setup.py --version`
mkdir tmp
cd tmp
cp ../dist/FiPy-${FIPY_VERSION}.zip .
unzip FiPy-${FIPY_VERSION}.zip
cd FiPy-${FIPY_VERSION}
python setup.py install
cd ..
python -c "import fipy; fipy.test()"
displayName: Test source
condition: startsWith(variables.image, 'windows')
- publish: $(System.DefaultWorkingDirectory)/dist/
artifact: dist-$(Agent.OS)