add build-wheels #46
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: Build msmbuilder2022 source code | |
on: | |
push: | |
branches: | |
- main | |
# ignore changes to docs | |
paths-ignore: | |
- ./docs/* | |
pull_request: | |
branches: | |
- main | |
# ignore changes to docs | |
paths-ignore: | |
- ./docs/* | |
jobs: | |
build-code: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
max-parallel: 6 | |
matrix: | |
python-version: ["3.9","3.10","3.11", "3.12"] | |
os: | |
- macOS-latest | |
- ubuntu-latest | |
- windows-latest | |
include: | |
- os: ubuntu-latest | |
path: ~/.cache/pip | |
- os: macos-latest | |
path: ~/Library/Caches/pip | |
- os: windows-latest | |
path: ~\AppData\Local\pip\Cache | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ matrix.path }} | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-activate-base: true | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
activate-environment: test | |
- name: Install required packages | |
run: | | |
conda config --add channels conda-forge | |
# conda install -yq conda-build jinja2 conda-verify | |
conda install -yq zlib | |
conda install h5py | |
python -m pip install --upgrade pip | |
# conda update conda-build | |
# - name: Conda build | |
# run: | | |
# conda build --quiet devtools/conda-recipe | |
- name: Pip install | |
run: | | |
python -m pip install . | |
- name: Test with pytest | |
run: | | |
# conda install -yq -c ${CONDA_PREFIX}/conda-bld/ msmbuilder2022 | |
conda install -yq numdifftools hmmlearn | |
pip install pytest | |
mkdir ../../pkgs | |
cp -r msmbuilder/tests ../../pkgs | |
cd ../../pkgs | |
python tests/data_init.py | |
pytest tests/ -v | |