add debug output #76
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 and Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-13, macos-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install Python requirements | |
run: python -m pip install maturin | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: stable | |
components: rustfmt, clippy | |
- name: Maturin build | |
uses: PyO3/maturin-action@v1 | |
with: | |
command: build | |
args: --release | |
- name: List Root | |
run: ls -l . | |
- name: Upload Python Wheel | |
uses: actions/upload-artifact@v4 | |
with: | |
name: python-wheels-${{ matrix.os }}-${{ matrix.python-version }} | |
path: target/wheels/*.whl | |
test: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Python Wheels | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: python-wheels* | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11 | |
- name: Install Wheels | |
run: ls -la && pip install natsort_rs-*-cp311-cp311-manylinux_*_x86_64.whl | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Run Tests | |
run: rm -rf natsort_rs && python -m unittest discover tests | |
deploy: | |
needs: [test, build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Python Wheels | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: python-wheels* | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11 | |
- name: Install Twine | |
run: python -m pip install --upgrade twine | |
- name: List Root | |
run: ls -l . | |
- name: Upload to PyPI | |
run: | | |
twine upload *.whl | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |