Skip to content

Commit

Permalink
Switch from provision to setup micromamba (#4197)
Browse files Browse the repository at this point in the history
* switch from provision to setup micromamba
* Switch fully to pytest-xdist auto in gh actions
  • Loading branch information
IAlibay authored Jul 30, 2023
1 parent 439435e commit ac30c88
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 43 deletions.
2 changes: 0 additions & 2 deletions .github/actions/setup-os/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ runs:
echo "CXX=clang++" >> $GITHUB_ENV
gfortran-9 -v
echo "FC=gfortran-9" >> $GITHUB_ENV
echo "numprocs=3" >> $GITHUB_ENV
echo "ENABLE_HIGH_MEM_UNIT_TESTS=true" >> $GITHUB_ENV
- name: setup_linux
Expand All @@ -39,4 +38,3 @@ runs:
echo "CXX=g++" >> $GITHUB_ENV
gfortran -v
echo "FC=gfortran" >> $GITHUB_ENV
echo "numprocs=2" >> $GITHUB_ENV
15 changes: 10 additions & 5 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,19 @@ jobs:
- uses: actions/checkout@v3

- name: setup_micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: False
environment-name: mda
extra-specs: |
python==${{ matrix.python-version }}
create-args: >-
python=${{ matrix.python-version }}
pip
channels: jaimergp/label/unsupported-cudatoolkit-shim, conda-forge, bioconda
# jaime's shim to avoid pulling down the cudatoolkit
# bioconda for clustalw things
condarc: |
channels:
- jaimergp/label/unsupported-cudatoolkit-shim
- conda-forge
- bioconda
- name: install_full_deps
uses: ./.github/actions/setup-deps
Expand Down
48 changes: 29 additions & 19 deletions .github/workflows/gh-ci-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,18 @@ jobs:
os-type: "ubuntu"

- name: setup_micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: False
environment-name: mda
extra-specs: |
python=="3.11"
create-args: >-
python=3.11
pip
channels: jaimergp/label/unsupported-cudatoolkit-shim, conda-forge, bioconda
# 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
Expand All @@ -68,7 +72,7 @@ jobs:

- name: run_tests
run: |
pytest -n $numprocs testsuite/MDAnalysisTests --durations=50 -W error::FutureWarning
pytest -n auto testsuite/MDAnalysisTests --durations=50 -W error::FutureWarning
# Issue #3442
Expand All @@ -86,14 +90,17 @@ jobs:
os-type: "ubuntu"

- name: setup_micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: False
environment-name: mda
extra-specs: |
python=="3.11"
create-args: >-
python=3.11
pip
channels: jaimergp/label/unsupported-cudatoolkit-shim, conda-forge, bioconda
condarc: |
channels:
- jaimergp/label/unsupported-cudatoolkit-shim
- conda-forge
- bioconda
- name: install_deps
uses: ./.github/actions/setup-deps
Expand All @@ -113,7 +120,7 @@ jobs:

- name: run_tests
run: |
pytest -n $numprocs testsuite/MDAnalysisTests --disable-pytest-warnings --durations=50
pytest -n auto testsuite/MDAnalysisTests --disable-pytest-warnings --durations=50
old_ubuntu_macos:
Expand All @@ -134,14 +141,17 @@ jobs:
os-type: ${{ matrix.os }}

- name: setup_micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: False
environment-name: mda
extra-specs: |
python=="3.9"
create-args: >-
python=3.9
pip
channels: jaimergp/label/unsupported-cudatoolkit-shim, conda-forge, bioconda
condarc: |
channels:
- jaimergp/label/unsupported-cudatoolkit-shim
- conda-forge
- bioconda
- name: install_deps
uses: ./.github/actions/setup-deps
Expand All @@ -157,7 +167,7 @@ jobs:

- name: run_tests
run: |
pytest -n $numprocs testsuite/MDAnalysisTests --disable-pytest-warnings --durations=50
pytest -n auto testsuite/MDAnalysisTests --disable-pytest-warnings --durations=50
# Issue 1727
Expand Down Expand Up @@ -195,7 +205,7 @@ jobs:
- name: run_tests
run: |
pytest -n $numprocs testsuite/MDAnalysisTests --disable-pytest-warnings --durations=50
pytest -n auto testsuite/MDAnalysisTests --disable-pytest-warnings --durations=50
# Issue 4208
conda-latest-release:
Expand Down
32 changes: 20 additions & 12 deletions .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
main_tests:
if: "github.repository == 'MDAnalysis/mdanalysis'"
runs-on: ${{ matrix.os }}
timeout-minutes: 60
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -61,14 +61,18 @@ jobs:
os-type: ${{ matrix.os }}

- name: setup_micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: False
environment-name: mda
extra-specs: |
python==${{ matrix.python-version }}
create-args: >-
python=${{ matrix.python-version }}
pip
channels: jaimergp/label/unsupported-cudatoolkit-shim, conda-forge, bioconda
# 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
Expand All @@ -93,7 +97,7 @@ jobs:
PYTEST_FLAGS="${PYTEST_FLAGS} --cov-config=.coveragerc --cov=MDAnalysis --cov-report=xml"
fi
echo $PYTEST_FLAGS
pytest -n $numprocs testsuite/MDAnalysisTests $PYTEST_FLAGS
pytest -n auto testsuite/MDAnalysisTests $PYTEST_FLAGS
- name: run_asv
if: contains(matrix.name, 'asv_check')
Expand Down Expand Up @@ -123,14 +127,18 @@ jobs:
- uses: actions/checkout@v3

- name: setup_micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: False
environment-name: mda
extra-specs: |
python=="3.9"
create-args: >-
python=3.9
pip
channels: conda-forge, bioconda
# 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
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/linters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,18 @@ jobs:
- uses: actions/checkout@v3

- name: setup_micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: False
environment-name: mda
extra-specs: |
python=="3.9"
create-args: >-
python=3.9
pip
channels: jaimergp/label/unsupported-cudatoolkit-shim, conda-forge, bioconda
# 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
Expand Down

0 comments on commit ac30c88

Please sign in to comment.