Skip to content

Commit

Permalink
use micromamba action for package installation (#221)
Browse files Browse the repository at this point in the history
* use  micromamba action
* use devtools/conda-envs/test_env.yaml
* use package and environment caching 
* note: MUST use flexible channel priority on conda-forge,bioconda channels in order
  to install GROMACS from bioconda
* benefits
   - Linux runners total runtime reduced from 5 min to 2:30 min
   - macos runner total runtime reduced by ~2 mins
  • Loading branch information
orbeckst authored Nov 18, 2022
1 parent bf3df13 commit cc104f0
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 24 deletions.
39 changes: 15 additions & 24 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ jobs:
- os: ubuntu-latest
python-version: "3.9"
gromacs-version: "2021.1"
- os: macos-latest
python-version: "3.9"
gromacs-version: "2021.1"
- os: macos-latest
python-version: "3.10"
gromacs-version: "2021.1"
Expand All @@ -57,38 +54,32 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: conda-incubator/setup-miniconda@v2
- name: mamba environment and package installation
uses: mamba-org/provision-with-micromamba@main
with:
python-version: ${{ matrix.python-version }}
auto-update-conda: true
mamba-version: "*"
channels: conda-forge,bioconda,defaults
channel-priority: true
show-channel-urls: true
environment-file: devtools/conda-envs/test_env.yaml
channel-priority: "flexible"
cache-downloads: true
cache-env: true
extra-specs: |
python=${{ matrix.python-version }}
- name: Conda info
run: |
conda info
conda list
conda config --show-sources
conda config --show
- name: Python version
- name: Python version information
run: |
python -c "import sys; print(sys.version)"
- name: Install package dependencies
- name: micromamba environment information
run: |
mamba install six numpy scipy matplotlib-base pandas scikit-learn pyyaml "mdanalysis>=2" numkit gromacswrapper "alchemlyb<2"
- name: Install pytest+plugins and pybol
micromamba info
micromamba list
- name: Install pybol (fixture staging tool)
run: |
mamba install pytest pytest-pep8 pytest-cov codecov
python -m pip install pybol
- name: Install GROMACS (${{ matrix.gromacs-version }})
run: |
mamba install 'gromacs==${{ matrix.gromacs-version }}' pocl
micromamba install 'gromacs==${{ matrix.gromacs-version }}' pocl
- name: Install package (with no dependencies)
run: |
Expand Down
23 changes: 23 additions & 0 deletions devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: test
channels:
- conda-forge
- bioconda
dependencies:
- python
- six
- numpy
- scipy
- matplotlib-base
- pandas
- scikit-learn
- pyyaml
- mdanalysis >=2
- numkit
- gromacswrapper
- alchemlyb <2

# Testing
- pytest
- pytest-pep8
- pytest-cov
- codecov

0 comments on commit cc104f0

Please sign in to comment.