Update dependencies and docs,, add GitHub action, and clean up #17
This file contains hidden or 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 the Python Wheel | |
on: | |
push: | |
branches: [ main ] | |
tags: [ 'v*' ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- name: x86-windows | |
image: windows-2022 | |
arch: x86 | |
- name: x86_64-windows | |
image: windows-2022 | |
arch: x86_64 | |
- name: x86_64-linux | |
image: ubuntu-20.04 | |
arch: x86_64 | |
- name: x86_64-darwin | |
image: macos-12 | |
arch: x86_64 | |
runs-on: ${{ matrix.image }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Query Python executable | |
run: which python | |
- name: Install dependencies | |
run: python -m pip install h5py matplotlib numpy pytest scipy wheel | |
- name: Build Python Wheel | |
run: python setup.py bdist_wheel | |
- name: Install Python Wheel | |
shell: bash | |
run: | | |
for f in dist/SDF-*-py3-none-any.whl; do | |
python -m pip install $f --no-deps -vv | |
done | |
- name: Run Python tests | |
run: pytest tests | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.name }} | |
path: dist/*.whl | |
if-no-files-found: error |