Add pyRiemann test.py and unit tests #357
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 file is autogenerated by maturin v1.5.1 | |
# To update, run | |
# | |
# maturin generate-ci -m python/Cargo.toml github --pytest --zig --platform linux macos | |
# | |
name: Python Release | |
on: | |
push: | |
branches: | |
- main | |
- master | |
tags: | |
- "*" | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
linux: | |
runs-on: ${{ matrix.platform.runner }} | |
strategy: | |
matrix: | |
platform: | |
- runner: ubuntu-latest | |
target: x86_64 | |
local_name: x86_64 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install Golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.22" | |
- name: Update pip | |
run: python -m pip install --upgrade pip | |
- name: Install Python dependencies | |
run: pip install -r python/requirements-dev.txt | |
- name: Build wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
target: ${{ matrix.platform.target }} | |
args: --release --out dist --find-interpreter --manifest-path python/Cargo.toml --zig | |
sccache: "false" | |
manylinux: auto | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-linux-${{ matrix.platform.target }} | |
path: dist | |
- name: pytest | |
shell: bash | |
run: | | |
set -e | |
python --version | |
ls -la dist | |
go install github.com/bystrogenomics/[email protected] | |
PYTHON_VERSION=$(python -c "import sys; print(f'cp{sys.version_info.major}{sys.version_info.minor}')") | |
ARCHITECTURE=${{ matrix.platform.local_name }} | |
echo "PYTHON_VERSION: $PYTHON_VERSION" | |
echo "ARCHITECTURE: $ARCHITECTURE" | |
WHEEL_FILE=$(find dist -name "*${PYTHON_VERSION}*${ARCHITECTURE}*.whl" | head -n 1) | |
echo "WHEEL_FILE: $WHEEL_FILE" | |
pip install $WHEEL_FILE --verbose --force-reinstall | |
bystro-api --help | |
pip install pytest | |
ray start --head | |
cd python && pytest | |
macos: | |
runs-on: ${{ matrix.platform.runner }} | |
strategy: | |
matrix: | |
platform: | |
- runner: macos-12 | |
target: x86_64 | |
local_name: x86_64 | |
- runner: macos-14 | |
target: aarch64 | |
local_name: arm64 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install Golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.22" | |
- name: Update pip | |
run: python -m pip install --upgrade pip | |
- name: Install Python dependencies | |
run: pip install -r python/requirements-dev.txt | |
- name: Build wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
target: ${{ matrix.platform.target }} | |
args: --release --out dist --find-interpreter --manifest-path python/Cargo.toml | |
sccache: "false" | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-macos-${{ matrix.platform.target }} | |
path: dist | |
- name: pytest | |
shell: bash | |
run: | | |
set -e | |
python --version | |
ls -la dist | |
go install github.com/bystrogenomics/[email protected] | |
PYTHON_VERSION=$(python -c "import sys; print(f'cp{sys.version_info.major}{sys.version_info.minor}')") | |
ARCHITECTURE=${{ matrix.platform.local_name }} | |
echo "PYTHON_VERSION: $PYTHON_VERSION" | |
echo "ARCHITECTURE: $ARCHITECTURE" | |
WHEEL_FILE=$(find dist -name "*${PYTHON_VERSION}*${ARCHITECTURE}*.whl" | head -n 1) | |
echo "WHEEL_FILE: $WHEEL_FILE" | |
pip install $WHEEL_FILE --verbose --force-reinstall | |
bystro-api --help | |
pip install pytest | |
ray start --head | |
cd python && pytest | |
sdist: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build sdist | |
uses: PyO3/maturin-action@v1 | |
with: | |
command: sdist | |
args: --out dist --manifest-path python/Cargo.toml | |
- name: Upload sdist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-sdist | |
path: dist | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
if: "startsWith(github.ref, 'refs/tags/')" | |
needs: [linux, macos, sdist] | |
steps: | |
- uses: actions/download-artifact@v4 | |
- name: Publish to PyPI | |
uses: PyO3/maturin-action@v1 | |
env: | |
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
with: | |
command: upload | |
args: --non-interactive --skip-existing wheels-*/* |