Skip to content

Commit d11a1ef

Browse files
authored
[CI] MDAnalysis self-dependency build fix (#4502)
* Fix MDAnalysis cron CI * Fix deployment workflow python and utility versions * Make sure we install mdakit dependencies using no-deps * Fix nightly wheel tests.
1 parent 277b99f commit d11a1ef

File tree

5 files changed

+80
-54
lines changed

5 files changed

+80
-54
lines changed

.github/actions/build-src/action.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ runs:
6666
micromamba info
6767
micromamba list
6868
69+
- name: mda_deps
70+
shell: bash -l {0}
71+
run: |
72+
# Install mdakit deps that depend on MDA
73+
python -m pip install --no-deps \
74+
waterdynamics \
75+
pathsimanalysis \
76+
mdahole2
77+
6978
- name: build_mda_main
7079
shell: bash -l {0}
7180
run: |
@@ -84,6 +93,12 @@ runs:
8493
fi
8594
python -m pip install ${BUILD_FLAGS} -v -e ./testsuite
8695
96+
- name: post_build_env_check
97+
shell: bash -l {0}
98+
run: |
99+
pip list
100+
micromamba list
101+
87102
- name: build_docs
88103
if: ${{ inputs.build-docs == 'true' }}
89104
shell: bash -l {0}

.github/actions/setup-deps/action.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ inputs:
3131
default: 'hypothesis'
3232
matplotlib:
3333
default: 'matplotlib-base'
34-
mdahole2:
35-
default: 'mdahole2-base'
3634
mda_xdrlib:
3735
default: 'mda-xdrlib'
3836
mmtf-python:
@@ -41,8 +39,6 @@ inputs:
4139
default: 'numpy'
4240
packaging:
4341
default: 'packaging'
44-
pathsimanalysis:
45-
default: 'pathsimanalysis'
4642
pip:
4743
default: 'pip'
4844
pytest:
@@ -53,8 +49,6 @@ inputs:
5349
default: 'threadpoolctl'
5450
tqdm:
5551
default: 'tqdm>=4.43.0'
56-
waterdynamics:
57-
default: 'waterdynamics'
5852
# conda-installed optional dependencies
5953
biopython:
6054
default: 'biopython>=1.80'
@@ -120,18 +114,15 @@ runs:
120114
${{ inputs.griddataformats }}
121115
${{ inputs.hypothesis }}
122116
${{ inputs.matplotlib }}
123-
${{ inputs.mdahole2 }}
124117
${{ inputs.mda_xdrlib }}
125118
${{ inputs.mmtf-python }}
126119
${{ inputs.numpy }}
127120
${{ inputs.packaging }}
128-
${{ inputs.pathsimanalysis }}
129121
${{ inputs.pip }}
130122
${{ inputs.pytest }}
131123
${{ inputs.scipy }}
132124
${{ inputs.threadpoolctl }}
133125
${{ inputs.tqdm }}
134-
${{ inputs.waterdynamics }}
135126
CONDA_OPT_DEPS: |
136127
${{ inputs.biopython }}
137128
${{ inputs.chemfiles-python }}

.github/workflows/deploy.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ jobs:
3838
matrix:
3939
buildplat:
4040
- [ubuntu-22.04, manylinux_x86_64, x86_64]
41-
- [macos-11, macosx_*, x86_64]
41+
- [macos-12, macosx_*, x86_64]
4242
- [windows-2019, win_amd64, AMD64]
4343
- [macos-14, macosx_*, arm64]
44-
python: ["cp39", "cp310", "cp311", "cp312"]
44+
python: ["cp310", "cp311", "cp312"]
4545
defaults:
4646
run:
4747
working-directory: ./package
@@ -51,7 +51,7 @@ jobs:
5151
fetch-depth: 0
5252

5353
- name: Build wheels
54-
uses: pypa/cibuildwheel@v2.16.5
54+
uses: pypa/cibuildwheel@v2.20.0
5555
with:
5656
package-dir: package
5757
env:
@@ -142,7 +142,7 @@ jobs:
142142
mv dist/MDAnalysisTests-* testsuite/dist
143143
144144
- name: upload_source_and_wheels
145-
uses: pypa/gh-action-pypi-publish@v1.10.0
145+
uses: pypa/gh-action-pypi-publish@v1.10.1
146146
with:
147147
skip_existing: true
148148
repository_url: https://test.pypi.org/legacy/
@@ -171,7 +171,7 @@ jobs:
171171
mv dist/MDAnalysisTests-* testsuite/dist
172172
173173
- name: upload_tests
174-
uses: pypa/gh-action-pypi-publish@v1.10.0
174+
uses: pypa/gh-action-pypi-publish@v1.10.1
175175
with:
176176
packages_dir: testsuite/dist
177177
skip_existing: true

.github/workflows/gh-ci-cron.yaml

Lines changed: 57 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ on:
44
# 3 am Tuesdays and Fridays
55
- cron: "0 3 * * 2,5"
66
workflow_dispatch:
7+
# Uncomment when you need to test on a PR
8+
pull_request:
9+
branches:
10+
- develop
11+
712

813
concurrency:
914
# Probably overly cautious group naming.
@@ -21,6 +26,7 @@ env:
2126
MPLBACKEND: agg
2227

2328
jobs:
29+
# a pip only, minimal deps install w/ scipy & numpy nightly upstream wheels
2430
numpy_and_scipy_dev:
2531
if: "github.repository == 'MDAnalysis/mdanalysis'"
2632
runs-on: ubuntu-latest
@@ -34,45 +40,51 @@ jobs:
3440
with:
3541
os-type: "ubuntu"
3642

37-
- name: setup_micromamba
38-
uses: mamba-org/setup-micromamba@v1
39-
with:
40-
environment-name: mda
41-
create-args: >-
42-
python=3.11
43-
pip
44-
# using jaime's shim to avoid pulling down the cudatoolkit
45-
condarc: |
46-
channels:
47-
- jaimergp/label/unsupported-cudatoolkit-shim
48-
- conda-forge
49-
- bioconda
50-
51-
- name: install_deps
52-
uses: ./.github/actions/setup-deps
43+
- uses: actions/setup-python@v4
5344
with:
54-
micromamba: true
55-
full-deps: true
45+
python-version: ${{ matrix.python-version }}
5646

57-
# overwrite installs by picking up nightly wheels
47+
# minimally install nightly wheels & core deps
5848
- name: nightly_wheels
5949
run: |
60-
pip install --pre -U -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy numpy networkx matplotlib pandas
50+
# Nightlies: add in networkx and matplotlib because we can
51+
python -m pip install --pre -U --extra-index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
52+
scipy \
53+
numpy \
54+
networkx \
55+
matplotlib \
56+
# Base deps
57+
python -m pip install \
58+
"cython>=0.28" \
59+
packaging \
60+
"setuptools>69.4" \
61+
wheel \
62+
"griddataformats>=0.4.0" \
63+
"mmtf-python>=1.0" \
64+
"joblib>=0.12" \
65+
"tqdm>=4.43.0" \
66+
threadpoolctl \
67+
fasteners \
68+
mda-xdrlib \
69+
pytest \
70+
pytest-xdist \
71+
pytest-timeout
72+
# deps that depend on MDA
73+
python -m pip install --no-deps \
74+
waterdynamics \
75+
pathsimanalysis \
76+
mdahole2
77+
78+
- name: pre_install_list_deps
79+
run: python -m pip list
6180

62-
- name: list_deps
81+
- name: build_srcs
6382
run: |
64-
micromamba list
65-
pip list
83+
python -m pip install --no-build-isolation -v -e ./package
84+
python -m pip install --no-build-isolation -v -e ./testsuite
6685
67-
# Intentionally going with setup.py builds so we can build with latest
68-
- name: build_srcs
69-
uses: ./.github/actions/build-src
70-
with:
71-
build-tests: true
72-
build-docs: false
73-
# We don't use build isolation because we want to ensure that we
74-
# test building with brand new versions of NumPy here.
75-
isolation: false
86+
- name: post_install_list_deps
87+
run: python -m pip list
7688

7789
- name: run_tests
7890
run: |
@@ -136,7 +148,7 @@ jobs:
136148
strategy:
137149
fail-fast: false
138150
matrix:
139-
os: [ubuntu-20.04, macos-11]
151+
os: [ubuntu-20.04, macos-12]
140152

141153
steps:
142154
- uses: actions/checkout@v4
@@ -151,7 +163,7 @@ jobs:
151163
with:
152164
environment-name: mda
153165
create-args: >-
154-
python=3.9
166+
python=3.10
155167
pip
156168
condarc: |
157169
channels:
@@ -210,6 +222,9 @@ jobs:
210222
run: |
211223
pip install pytest-xdist pytest-timeout
212224
225+
- name: check env
226+
run: pip list
227+
213228
- name: run_tests
214229
run: |
215230
pytest --timeout=200 -n auto testsuite/MDAnalysisTests --disable-pytest-warnings --durations=50
@@ -218,12 +233,14 @@ jobs:
218233
conda-latest-release:
219234
# A set of runner to check that the latest conda release works as expected
220235
if: "github.repository == 'MDAnalysis/mdanalysis'"
221-
runs-on: ${{ matrix.os }}-latest
236+
runs-on: ${{ matrix.os }}
222237
timeout-minutes: 60
223238
strategy:
224239
fail-fast: false
225240
matrix:
226-
os: [ubuntu, macos]
241+
# Stick to macos-13 because some of our
242+
# optional depss don't support arm64 (i.e. macos-14)
243+
os: [ubuntu-latest, macos-13]
227244
python-version: ["3.9", "3.10", "3.11", "3.12"]
228245
steps:
229246
- uses: actions/checkout@v4
@@ -247,16 +264,16 @@ jobs:
247264
- conda-forge
248265
- bioconda
249266
267+
- name: install_mdanalysis
268+
run: |
269+
micromamba install mdanalysis mdanalysistests
270+
250271
- name: install_deps
251272
uses: ./.github/actions/setup-deps
252273
with:
253274
micromamba: true
254275
full-deps: true
255276

256-
- name: install_mdanalysis
257-
run: |
258-
micromamba install mdanalysis mdanalysistests
259-
260277
- name: run_tests
261278
run: |
262279
pytest --timeout=200 -n auto --pyargs MDAnalysisTests

.github/workflows/gh-ci.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,9 @@ jobs:
276276
python -m pip install mdanalysis-*.tar.gz
277277
python -m pip install mdanalysistests-*.tar.gz
278278
279+
- name: check install
280+
run: pip list
281+
279282
- name: run tests
280283
working-directory: ./dist
281284
run: python -m pytest --timeout=200 -n auto --pyargs MDAnalysisTests

0 commit comments

Comments
 (0)