[CI] MDAnalysis self-dependency build fix #325
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# minimally install nightly wheels | |
- name: nightly_wheels | |
run: | | |
# Also throw in networkx and matplotlib too since we can | |
pip install --pre -U -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy numpy networkx matplotlib | |
# install any additional deps we might need | |
- name: extra_deps | |
run: | | |
pip install pytest-xdist pytest-timeout | |
- name: list_deps | |
run: | | |
micromamba list | |
pip list | |
- name: build_srcs | |
uses: ./.github/actions/build-src | |
with: | |
build-tests: true | |
build-docs: false | |
# We don't use build isolation because we want to ensure that we | |
# test building with brand new versions of NumPy here. | |
isolation: false | |
- 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"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup_os | |
uses: ./.github/actions/setup-os | |
with: | |
os-type: "ubuntu" | |
- uses: actions/setup-python@v4 | |
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_deps | |
uses: ./.github/actions/setup-deps | |
with: | |
micromamba: true | |
full-deps: true | |
- name: install_mdanalysis | |
run: | | |
micromamba install mdanalysis mdanalysistests | |
- 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@v4 | |
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 |