ci: run pyo3-ffi-check

This commit is contained in:
messense 2022-11-22 20:35:00 +08:00
parent 84d68d44ae
commit 9a164bac54
No known key found for this signature in database
GPG Key ID: BB41A8A2C716CCA9
1 changed files with 27 additions and 0 deletions

View File

@ -131,6 +131,32 @@ jobs:
nox -s test-py
env:
CARGO_TARGET_DIR: ${{ github.workspace }}/target
- uses: dorny/paths-filter@v2
if: ${{ inputs.rust == 'stable' && inputs.python-version != 'pypy3.7' && inputs.python-version != 'pypy3.8' }}
id: ffi-changes
with:
filters: |
changed:
- 'pyo3-ffi/**'
- '.github/workflows/ci.yml'
- '.github/workflows/build.yml'
- name: Checkout pyo3-ffi-check
# pypy 3.7 and 3.8 are not PEP 3123 compliant so fail checks here
if: ${{ steps.ffi-changes.outputs.changed == 'true' && inputs.rust == 'stable' && inputs.python-version != 'pypy3.7' && inputs.python-version != 'pypy3.8' }}
uses: actions/checkout@v3
with:
repository: PyO3/pyo3-ffi-check
path: pyo3-ffi-check
- run: cargo doc -p pyo3-ffi
working-directory: pyo3-ffi-check
if: ${{ steps.ffi-changes.outputs.changed == 'true' && inputs.rust == 'stable' && inputs.python-version != 'pypy3.7' && inputs.python-version != 'pypy3.8' }}
- run: cargo run
working-directory: pyo3-ffi-check
if: ${{ steps.ffi-changes.outputs.changed == 'true' && inputs.rust == 'stable' && inputs.python-version != 'pypy3.7' && inputs.python-version != 'pypy3.8' }}
- name: Test cross compilation
if: ${{ inputs.os == 'ubuntu-latest' && inputs.python-version == '3.9' }}
@ -177,6 +203,7 @@ jobs:
export PYO3_CROSS_PYTHON_VERSION=3.9
cargo build --manifest-path examples/maturin-starter/Cargo.toml --features generate-import-lib --target x86_64-pc-windows-gnu
cargo xwin build --manifest-path examples/maturin-starter/Cargo.toml --features generate-import-lib --target x86_64-pc-windows-msvc
- name: Test cross compile to Windows with maturin
if: ${{ inputs.os == 'ubuntu-latest' && inputs.python-version == '3.8' }}
uses: PyO3/maturin-action@v1