Skip to content

Add support for Python 3.12 #49

Add support for Python 3.12

Add support for Python 3.12 #49

Workflow file for this run

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
name: Tests & Linting
jobs:
test:
name: Test Suite
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
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 --release --strip --manylinux off -i $pythonLocation/python
if: ${{ runner.os != 'Windows' }}
- run: maturin build --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
test_manylinux_release:
name: Test manylinux release build
runs-on: ubuntu-latest
strategy:
matrix:
python-path: ['cp38-cp38', 'cp39-cp39', 'cp310-cp310', 'cp311-cp311', 'cp312-cp312']
container: quay.io/pypa/manylinux_2_28_x86_64:latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: x86_64-unknown-linux-gnu
- run: yum makecache && yum -y install libffi-devel 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: OPENSSL_STATIC=1 .venv/bin/maturin build --release --strip --manylinux 2_28 -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