Skip to content

GH Actions Cron CI #395

GH Actions Cron CI

GH Actions Cron CI #395

Workflow file for this run

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@v2
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@v2
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@v2
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