add macos runner #1490
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
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the action will run. | |
on: [push, pull_request, workflow_dispatch] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
runs-on: [ubuntu-latest, macos-latest] | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: MatteoH2O1999/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Add conda to system path | |
run: | | |
echo $CONDA/bin >> $GITHUB_PATH | |
- name: Install dependencies | |
run: | | |
conda create --yes -n test python=${{ matrix.python-version }} | |
source activate test | |
conda config --add channels conda-forge | |
conda install --yes numpy scipy nose requests | |
conda install --yes pdbfixer mdtraj openmm | |
conda install --yes fortran-compiler cxx-compiler | |
pip install mmtf-python scikit-learn | |
cd prody/proteins/hpbmodule/ | |
gfortran -O3 -fPIC -c reg_tet.f | |
variable=$(python -c 'from distutils.sysconfig import get_python_inc; print(get_python_inc())') | |
c++ -O3 -g -fPIC -c hpbmodule.cpp -o hpbmodule.o -I/$variable | |
c++ -shared -Wl,-soname,hpb.so -o hpb.so hpbmodule.o reg_tet.o -lgfortran | |
cp hpb.so ../ | |
cd - | |
pip install . | |
python setup.py build_ext --inplace --force | |
- name: Test with pytest | |
run: | | |
source activate test | |
conda install --yes pytest | |
pytest | |