name: Build and Upload Wheels for the Python Bindings
on:
workflow_dispatch:
push:
branches:
- develop
- production
paths:
- '.github/workflows/python-bindings-publish.yml'
- '.github/actions/**'
- 'bindings/python/**'
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'
jobs:
wheels:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-latest, windows-latest]
python: ['3.9']
include:
- os: ubuntu-18.04
identifier: linux
- os: macos-latest
identifier: macos
- os: windows-latest
identifier: windows
steps:
- name: Checkout the Source Code
uses: actions/checkout@v2
- name: Set Up Stable Rust
uses: ./.github/actions/setup-rust
with:
toolchain: stable
cache: false
- name: Set Up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
architecture: 'x64'
- name: Build Wheels
working-directory: bindings/python/native
run: |
python3 -m pip install -v maturin
maturin build --release --manylinux off
- name: Upload Wheels
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.identifier }}-iota-client-py${{ matrix.python }}-wheel
path: bindings/python/native/target/wheels/