Skip to content

Commit

Permalink
Merge pull request #75 from nucypher/release-ferveo-py
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-roslaniec committed Apr 13, 2023
2 parents 8fa25b6 + df38549 commit 2529f74
Show file tree
Hide file tree
Showing 26 changed files with 592 additions and 335 deletions.
100 changes: 100 additions & 0 deletions .github/workflows/maturin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
defaults:
run:
working-directory: ./ferveo-python
linux:
runs-on: ubuntu-latest
strategy:
matrix:
target: [
x86_64,
# x86,
# aarch64,
# armv7,
# s390x,
# ppc64le
]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
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 ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: ${{ matrix.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

macos:
runs-on: macos-latest
strategy:
matrix:
target: [ x86_64, aarch64 ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
- 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 *
139 changes: 0 additions & 139 deletions .github/workflows/wheels.yml

This file was deleted.

39 changes: 37 additions & 2 deletions .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ jobs:
with:
command: fmt
args: --all -- --check
- name: Install cargo-machete
uses: baptiste0928/cargo-install@v1
with:
crate: cargo-machete
- run: cargo machete

test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -87,7 +92,7 @@ jobs:
target:
- wasm32-unknown-unknown
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand All @@ -107,7 +112,7 @@ jobs:
target:
- wasm32-unknown-unknown
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand All @@ -127,6 +132,36 @@ jobs:
with:
cmd: --cwd tpke-wasm/examples/node test

python-test:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
target:
- wasm32-unknown-unknown
python:
- "3.10"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true

- run: pip install -e .
working-directory: ferveo-python

- run: python examples/server_api.py
working-directory: ferveo-python

codecov:
runs-on: ubuntu-latest
needs: [ test ]
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
target
*.wasm
tpke-python/py-benches/inputs/
tpke-python/py-benches/inputs/
.venv
Loading

0 comments on commit 2529f74

Please sign in to comment.