forked from aviramha/rfernet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added bindings for multifernet * updated workflows * typing fix * version change * new init * upgraded pyo3
- Loading branch information
Showing
14 changed files
with
480 additions
and
443 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "rfernet" | ||
version = "0.1.3" | ||
version = "0.2.0" | ||
authors = ["Aviram Hassan <[email protected]>"] | ||
description = "Fast Fernet bindings for Python" | ||
license = "MIT" | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
|
||
name: Release | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
|
||
|
||
jobs: | ||
release_manylinux: | ||
name: Release manylinux | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-path: ['cp36-cp36m', 'cp37-cp37m', 'cp38-cp38', 'cp39-cp39', 'cp310-cp310'] | ||
container: quay.io/pypa/manylinux_2_24_x86_64:latest | ||
env: | ||
TWINE_PASSWORD: ${{secrets.TWINE_PASSWORD}} | ||
TWINE_USERNAME: ${{secrets.TWINE_USERNAME}} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
- run: yum install -y libffi libffi-devel openssl openssl-devel | ||
- run: /opt/python/${{ matrix.python-path }}/bin/python -m venv .venv | ||
- run: .venv/bin/pip install -U pip wheel | ||
- run: .venv/bin/pip install -U twine maturin | ||
- run: .venv/bin/pip install -r requirements.txt | ||
- run: .venv/bin/maturin build --no-sdist --release --strip --manylinux 2_24 -i /opt/python/${{ matrix.python-path }}/bin/python --target x86_64-unknown-linux-gnu | ||
- run: .venv/bin/pip install rfernet --no-index -f target/wheels | ||
- run: .venv/bin/pytest | ||
- run: .venv/bin/twine upload --non-interactive --skip-existing target/wheels/* | ||
release_windows: | ||
name: Release windows | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.6', '3.7', '3.8', '3.9'] | ||
env: | ||
TWINE_PASSWORD: ${{secrets.TWINE_PASSWORD}} | ||
TWINE_USERNAME: ${{secrets.TWINE_USERNAME}} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- run: pip install --user -U pip wheel twine maturin | ||
- run: pip install -r requirements.txt | ||
- run: maturin build --no-sdist --release --strip -i $pythonLocation"python.exe" | ||
- run: pip install rfernet --no-index -f target/wheels | ||
- run: pytest | ||
- run: twine upload --non-interactive --skip-existing target\wheels\* | ||
|
||
release_macos: | ||
name: Release macOS | ||
strategy: | ||
matrix: | ||
python-version: ['3.6', '3.7', '3.8', '3.9'] | ||
runs-on: macos-latest | ||
env: | ||
TWINE_PASSWORD: ${{secrets.TWINE_PASSWORD}} | ||
TWINE_USERNAME: ${{secrets.TWINE_USERNAME}} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- run: pip install -U pip wheel twine maturin | ||
- run: pip install -r requirements.txt | ||
- run: maturin build --no-sdist --release --strip --manylinux off -i $pythonLocation/python --target x86_64-apple-darwin | ||
- run: pip install rfernet --no-index -f target/wheels | ||
- run: pytest | ||
- run: twine upload --non-interactive --skip-existing target/wheels/* | ||
release_sdist: | ||
name: Release sdist | ||
runs-on: ubuntu-latest | ||
env: | ||
TWINE_PASSWORD: ${{secrets.TWINE_PASSWORD}} | ||
TWINE_USERNAME: ${{secrets.TWINE_USERNAME}} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- run: pip install -U pip wheel twine maturin | ||
- run: pip install -r requirements.txt | ||
- run: maturin sdist | ||
- run: twine upload --non-interactive --skip-existing target/wheels/* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
name: Tests & Linting | ||
|
||
jobs: | ||
test: | ||
name: Test Suite | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10.0-rc.1'] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- run: pip install --user -U pip wheel | ||
- run: pip install -r requirements.txt | ||
- run: maturin build --no-sdist --release --strip --manylinux off -i $pythonLocation/python | ||
if: ${{ runner.os != 'Windows' }} | ||
- run: maturin build --no-sdist --release --strip --manylinux off -i $pythonLocation"python.exe" | ||
if: ${{ runner.os == 'Windows' }} | ||
- run: pip install rfernet --no-index -f target/wheels | ||
- run: pytest tests/ | ||
|
||
fmt: | ||
name: Rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
- run: rustup component add rustfmt | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
override: true | ||
- run: rustup component add clippy | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: -- -D warnings |
Oops, something went wrong.