-
Notifications
You must be signed in to change notification settings - Fork 832
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
216 lines (209 loc) · 5.86 KB
/
azure-pipelines.yml
File metadata and controls
216 lines (209 loc) · 5.86 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
trigger:
# start a new build for every push
batch: False
branches:
include:
- develop
paths:
include:
- '*'
pr:
branches:
include:
- '*' # must quote since "*" is a YAML reserved character; we want a string
jobs:
- job: Precommit_Lint
displayName: 'Pre-commit checks'
pool:
vmImage: 'ubuntu-latest'
variables:
PRE_COMMIT_HOME: '$(Pipeline.Workspace)/.pre-commit-cache'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11'
addToPath: true
architecture: 'x64'
- task: Cache@2
inputs:
key: 'pre-commit | "$(Agent.OS)" | .pre-commit-config.yaml'
path: '$(PRE_COMMIT_HOME)'
restoreKeys: |
pre-commit | "$(Agent.OS)"
- script: python -m pip install --upgrade pip pre-commit
displayName: 'Install pre-commit'
- script: PRE_COMMIT_HOME=$(PRE_COMMIT_HOME) pre-commit run --all-files
displayName: 'Run pre-commit hooks'
- job: Ruff_Lint
displayName: 'Ruff lint checks'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11'
addToPath: true
architecture: 'x64'
- script: python -m pip install --upgrade pip ruff
displayName: 'Install ruff'
- script: ruff check package testsuite
displayName: 'Run ruff checks'
- job: Smoke_Tests
displayName: 'Smoke tests'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11'
addToPath: true
architecture: 'x64'
- script: python -m pip install --upgrade pip setuptools wheel
displayName: 'Install tools'
- script: >-
python -m pip install --only-binary=scipy,h5py
cython
h5py>=2.10
matplotlib
numpy
packaging
pytest
tqdm
threadpoolctl
filelock
displayName: 'Install smoke dependencies'
- script: >-
python -m pip install
./package
./testsuite
displayName: 'Install package and testsuite'
- script: >-
pytest testsuite/MDAnalysisTests/test_api.py
--disable-pytest-warnings
-q
displayName: 'Run smoke tests'
- job: Azure_Tests
dependsOn:
- Precommit_Lint
- Ruff_Lint
- Smoke_Tests
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/develop')) # skip for PR merges
variables:
MPLBACKEND: agg
strategy:
matrix:
Win-Python311-64bit-full:
PYTHON_VERSION: '3.11'
PYTHON_ARCH: 'x64'
BUILD_TYPE: 'normal'
imageName: 'windows-latest'
Win-Python313-64bit-full:
PYTHON_VERSION: '3.13'
PYTHON_ARCH: 'x64'
BUILD_TYPE: 'normal'
imageName: 'windows-latest'
Win-Python313-64bit-full-wheel:
PYTHON_VERSION: '3.13'
PYTHON_ARCH: 'x64'
BUILD_TYPE: 'wheel'
NUMPY_MIN: '2.1.0'
imageName: 'windows-latest'
Win-Python311-64bit-full-wheel:
PYTHON_VERSION: '3.11'
PYTHON_ARCH: 'x64'
BUILD_TYPE: 'wheel'
NUMPY_MIN: '1.26.0'
imageName: 'windows-latest'
Linux-Python313-64bit-full-wheel:
PYTHON_VERSION: '3.13'
PYTHON_ARCH: 'x64'
BUILD_TYPE: 'wheel'
NUMPY_MIN: '2.1.0'
imageName: 'ubuntu-latest'
Linux-Python311-64bit-full-wheel:
PYTHON_VERSION: '3.11'
PYTHON_ARCH: 'x64'
BUILD_TYPE: 'wheel'
NUMPY_MIN: '1.26.0'
imageName: 'ubuntu-latest'
pool:
vmImage: $(imageName)
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
addToPath: true
architecture: $(PYTHON_ARCH)
# a PEP518 compliant wheel build shoud be
# able to build MDAnalysis in an isolated
# environment *before* any deps are installed
# "manually"
- powershell: |
cd package
python -m pip -v install .
cd ..
displayName: 'Build MDAnalysis (wheel)'
condition: and(succeeded(), eq(variables['BUILD_TYPE'], 'wheel'))
- script: python -m pip install --upgrade pip setuptools wheel
displayName: 'Install tools'
- script: >-
python -m pip install --only-binary=scipy,h5py
cython
hypothesis
h5py>=2.10
matplotlib
numpy
packaging
pytest
pytest-cov
pytest-timeout
pytest-xdist
scikit-learn
tqdm
threadpoolctl
filelock
displayName: 'Install dependencies'
# for wheel install testing, we pin to an
# older NumPy, the oldest version we support and that
# supports the Python version in use
# to check the ABI compatibility of our wheels
- script: >-
python -m pip install numpy==$(NUMPY_MIN)
displayName: 'pin to older NumPy (wheel test)'
condition: and(succeeded(), ne(variables['NUMPY_MIN'], ''))
- script: >-
python -m pip install -vvv
biopython
chemfiles>=0.10
duecredit
joblib
GridDataFormats
mmtf-python
networkx
parmed
rdkit>=2024.03.4
tidynamics>=1.0.0
imdclient>=0.2.2
pytng>=0.3.4
# remove from azure to avoid test hanging #4707
# "gsd>3.0.0"
displayName: 'Install additional dependencies for 64-bit tests'
condition: and(succeeded(), eq(variables['PYTHON_ARCH'], 'x64'))
- script: >-
pip list
displayName: 'List of installed dependencies'
- powershell: |
python -m pip install ./package
python -m pip install ./testsuite
displayName: 'Build MDAnalysis'
condition: and(succeeded(), eq(variables['BUILD_TYPE'], 'normal'))
- powershell: pip list
displayName: 'Check installed packages'
- powershell: |
cd testsuite
pytest MDAnalysisTests --disable-pytest-warnings -n logical --timeout=200 -rsx --cov=MDAnalysis
displayName: 'Run MDAnalysis Test Suite'
- script: |
curl -s https://codecov.io/bash | bash
condition: succeeded()
displayName: 'Codecov Coverage Data Upload'