Merge pull request #152 from nucypher/piotr-roslaniec-patch-1 #179
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: Maturin | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
env: | ||
python-versions: [ "3.7", "3.8", "3.9", "3.10" ] | ||
Check failure on line 11 in .github/workflows/maturin.yml GitHub Actions / MaturinInvalid workflow file
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
target: [ x86_64 ] | ||
# TODO: Enable these upon stable release | ||
# x86, | ||
# aarch64, | ||
# armv7, | ||
# s390x, | ||
# ppc64le | ||
python-version: ${{ env.python-versions }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
args: --release --out dist --find-interpreter --manifest-path ferveo-python/Cargo.toml | ||
manylinux: auto | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels | ||
path: dist | ||
windows: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
target: [ x64, x86 ] | ||
python-version: ${{ env.python-versions }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: ${{ matrix.target }} | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
args: --release --out dist --find-interpreter --manifest-path ferveo-python/Cargo.toml | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels | ||
path: dist | ||
macos: | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
target: [ x86_64, aarch64 ] | ||
python-version: ${{ env.python-versions }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
args: --release --out dist --find-interpreter --manifest-path ferveo-python/Cargo.toml | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels | ||
path: dist | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
# Only runs on tagged versions | ||
if: "startsWith(github.ref, 'refs/tags/')" | ||
needs: [ linux, windows, macos ] | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: wheels | ||
- name: Publish to PyPI | ||
uses: PyO3/maturin-action@v1 | ||
env: | ||
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | ||
with: | ||
command: upload | ||
args: --skip-existing * |