Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,26 @@ on:
jobs:
CI:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}
- name: Build Wheel
uses: messense/maturin-action@v1
uses: PyO3/maturin-action@v1
with:
manylinux: off
args: --find-interpreter
- uses: abatilo/actions-poetry@v2.3.0
- name: Install poetry
uses: abatilo/actions-poetry@v4
- uses: dtolnay/rust-toolchain@stable
with: { toolchain: stable }
- name: Run Tests
run: |
poetry install
poetry install --no-root
poetry run maturin develop
poetry run pytest
41 changes: 24 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
tags:
- v*
pull_request:
branches:
- 'main'

Expand All @@ -14,18 +13,24 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
target: [x64, aarch64]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build wheels
uses: messense/maturin-action@v1
uses: PyO3/maturin-action@v1
with:
command: build
target: ${{ matrix.target }}
args: --release -o dist --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: wheels
name: macos-wheels-${{ matrix.python-version }}-${{matrix.target}}
path: dist

windows:
Expand All @@ -36,14 +41,15 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Build wheels
uses: messense/maturin-action@v1
uses: PyO3/maturin-action@v1
with:
command: build
target: ${{ matrix.target }}
args: --release -o dist --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: wheels
name: windows-wheels-${{ matrix.python-version }}-${{matrix.target}}
path: dist

linux:
Expand All @@ -54,15 +60,15 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Build Wheels
uses: messense/maturin-action@v1
uses: PyO3/maturin-action@v1
with:
command: build
target: ${{ matrix.target }}
manylinux: auto
args: --release -o dist --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: wheels
name: linux-wheels-${{ matrix.python-version }}-${{matrix.target}}
path: dist

# TODO Add pypy
Expand All @@ -73,16 +79,17 @@ jobs:
if: "startsWith(github.ref, 'refs/tags/')"
needs: [ macos, linux, windows]
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: wheels
- uses: actions/setup-python@v2
pattern: '*'
merge-multiple: true
- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.12
- name: Publish to PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_TOKEN }}
run: |
pip install --upgrade twine
twine upload --skip-existing *
Loading