-
Notifications
You must be signed in to change notification settings - Fork 652
320 lines (270 loc) · 8.51 KB
/
gh-ci-cron.yaml
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
name: GH Actions Cron CI
on:
schedule:
# 3 am Tuesdays and Fridays
- cron: "0 3 * * 2,5"
workflow_dispatch:
# Uncomment when you need to test on a PR
# pull_request:
# branches:
# - develop
concurrency:
# Probably overly cautious group naming.
# Commits to develop will cancel each other, but PRs will only cancel
# commits within the same PR
group: "${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }}"
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
env:
CYTHON_TRACE_NOGIL: 1
MPLBACKEND: agg
jobs:
# a pip only, minimal deps install w/ scipy & numpy nightly upstream wheels
numpy_and_scipy_dev:
if: "github.repository == 'MDAnalysis/mdanalysis'"
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: setup_os
uses: ./.github/actions/setup-os
with:
os-type: "ubuntu"
- uses: actions/setup-python@v5
# minimally install nightly wheels & core deps
- name: nightly_wheels
run: |
# Nightlies: add in networkx and matplotlib because we can
python -m pip install --pre -U --extra-index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
scipy \
numpy \
networkx \
matplotlib \
# Base deps
python -m pip install \
"cython>=0.28" \
packaging \
"setuptools>69.4" \
wheel \
"griddataformats>=0.4.0" \
"mmtf-python>=1.0" \
"joblib>=0.12" \
"tqdm>=4.43.0" \
threadpoolctl \
fasteners \
mda-xdrlib \
pytest \
pytest-xdist \
pytest-timeout
# deps that depend on MDA
python -m pip install --no-deps \
waterdynamics \
pathsimanalysis \
mdahole2
- name: pre_install_list_deps
run: python -m pip list
- name: build_srcs
run: |
python -m pip install --no-build-isolation -v -e ./package
python -m pip install --no-build-isolation -v -e ./testsuite
- name: post_install_list_deps
run: python -m pip list
- name: run_tests
run: |
pytest --timeout=200 -n auto testsuite/MDAnalysisTests --durations=50 -W error::FutureWarning
# Issue #3442
native_march:
if: "github.repository == 'MDAnalysis/mdanalysis'"
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: setup_os
uses: ./.github/actions/setup-os
with:
os-type: "ubuntu"
- name: setup_micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: mda
create-args: >-
python=3.11
pip
condarc: |
channels:
- jaimergp/label/unsupported-cudatoolkit-shim
- conda-forge
- bioconda
- name: install_deps
uses: ./.github/actions/setup-deps
with:
micromamba: true
full-deps: true
- name: set_extra_flags
run: |
sed -i "s/#extra_cflags =/extra_cflags = -march=native -mtune=native/g" package/setup.cfg
cat package/setup.cfg
- name: build_srcs
uses: ./.github/actions/build-src
with:
build-tests: true
build-docs: false
isolation: true
- name: run_tests
run: |
pytest --timeout=200 -n auto testsuite/MDAnalysisTests --disable-pytest-warnings --durations=50
old_ubuntu_macos:
if: "github.repository == 'MDAnalysis/mdanalysis'"
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-12]
steps:
- uses: actions/checkout@v4
- name: setup_os
uses: ./.github/actions/setup-os
with:
os-type: ${{ matrix.os }}
- name: setup_micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: mda
create-args: >-
python=3.10
pip
condarc: |
channels:
- jaimergp/label/unsupported-cudatoolkit-shim
- conda-forge
- bioconda
- name: install_deps
uses: ./.github/actions/setup-deps
with:
micromamba: true
full-deps: true
- name: build_srcs
uses: ./.github/actions/build-src
with:
build-tests: true
build-docs: false
isolation: true
- name: run_tests
run: |
pytest --timeout=200 -n auto testsuite/MDAnalysisTests --disable-pytest-warnings --durations=50
# Issue 1727
pip-only-develop:
if: "github.repository == 'MDAnalysis/mdanalysis'"
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: setup_os
uses: ./.github/actions/setup-os
with:
os-type: "ubuntu"
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: pip install mdanalysis
run: |
cd package && pip install .
- name: pip install mdanalysistests
run: |
cd testsuite && pip install .
- name: install_pip_extras
run: |
pip install pytest-xdist pytest-timeout
- name: check env
run: pip list
- name: run_tests
run: |
pytest --timeout=200 -n auto testsuite/MDAnalysisTests --disable-pytest-warnings --durations=50
# Issue 4208
conda-latest-release:
# A set of runner to check that the latest conda release works as expected
if: "github.repository == 'MDAnalysis/mdanalysis'"
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
# Stick to macos-13 because some of our
# optional depss don't support arm64 (i.e. macos-14)
os: [ubuntu-latest, macos-13]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: setup_os
uses: ./.github/actions/setup-os
with:
os-type: ${{ matrix.os }}
- name: setup_micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: mda
create-args: >-
python=${{ matrix.python-version }}
pip
# using jaime's shim to avoid pulling down the cudatoolkit
condarc: |
channels:
- jaimergp/label/unsupported-cudatoolkit-shim
- conda-forge
- bioconda
- name: install_mdanalysis
run: |
micromamba install mdanalysis mdanalysistests
- name: install_deps
uses: ./.github/actions/setup-deps
with:
micromamba: true
full-deps: true
- name: run_tests
run: |
pytest --timeout=200 -n auto --pyargs MDAnalysisTests
pypi-latest-release:
# A set of runner to check that the latest conda release works as expected
if: "github.repository == 'MDAnalysis/mdanalysis'"
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, macos-14, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
wheels: ['true', 'false']
exclude:
- os: "macos-14"
python-version: "3.9"
steps:
# Checkout to have access to local actions (i.e. setup-os)
- uses: actions/checkout@v4
# We need this here in order to make sure we assign the correct compiler (i.e. clang for macos)
- name: setup_os
uses: ./.github/actions/setup-os
with:
os-type: ${{ matrix.os }}
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: install_mdanalysis
shell: bash
run: |
# If wheels is False we build directly from source so we use the --no-binary flag
# to avoid pulling down wheels for MDAnalysis (which are already precompiled)
if [ "${{ matrix.wheels }}" == "false" ]; then
INSTALL_FLAGS="-vvv --no-binary"
fi
pip install ${INSTALL_FLAGS} mdanalysis mdanalysistests pytest-xdist pytest-timeout
- name: run_tests
shell: bash
run: |
pytest --timeout=200 -n auto --pyargs MDAnalysisTests