From 20e21254686ecfc8bf4b0893bdd374b339c2aef6 Mon Sep 17 00:00:00 2001 From: David Hewitt Date: Sat, 29 Aug 2026 09:05:35 +0100 Subject: [PATCH 1/2] add PyO3 FFI checks to the suite --- .github/workflows/pyo3.yml | 40 +++++++++++++++----------------------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/.github/workflows/pyo3.yml b/.github/workflows/pyo3.yml index 629a933..97af44d 100644 --- a/.github/workflows/pyo3.yml +++ b/.github/workflows/pyo3.yml @@ -48,44 +48,36 @@ jobs: # needed to correctly format errors, see #1865 components: rust-src + # In the future, might want to also try using the "abi3" feature once PyPy + # supports the Python stable API. + + - name: Prepare required packages + run: python -m pip install -U pip nox + + - name: Check PyO3 ffi definitions + shell: bash + working-directory: pyo3 + run: nox -s ffi-check + # NB only builds PyO3's Rust library and tests, can't run these, because # PyPy doesn't support a Py_Initialize API to call PyPy from Rust # executables. # # These jobs just serve as a check that PyO3 is able to link against PyPy # symbols as expected. - - name: Build PyO3 Rust lib and tests - no features - shell: bash - run: | - cd pyo3 - cargo build --lib --tests - env: - # Necessary to force PyO3 to allow building against PyPy despite no - # Py_Initialize API - PYO3_CI: 1 - - - name: Build PyO3 Rust lib and tests - with features + - name: Run PyO3 Rust test suite shell: bash - run: | - cd pyo3 - cargo build --lib --tests --features=full + working-directory: pyo3 + run: nox -s test-rust env: # Necessary to force PyO3 to allow building against PyPy despite no # Py_Initialize API PYO3_CI: 1 - # In the future, might want to also try using the "abi3" feature once PyPy - # supports the Python stable API. - - - name: Prepare required packages - run: | - python -m pip install -U pip nox - # Build some extension modules using PyO3 and test them using PyPy. - name: Test PyO3 examples shell: bash - run: | - cd pyo3 - nox -s test-py + working-directory: pyo3 + run: nox -s test-py env: CARGO_TARGET_DIR: ${{ github.workspace }}/pyo3/target From b170d4feaec45a5a8a721333447dcb2ae85cbbb0 Mon Sep 17 00:00:00 2001 From: David Hewitt Date: Tue, 1 Sep 2026 13:23:26 +0100 Subject: [PATCH 2/2] Rename test job for PyO3 examples --- .github/workflows/pyo3.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pyo3.yml b/.github/workflows/pyo3.yml index 97af44d..8b1ba90 100644 --- a/.github/workflows/pyo3.yml +++ b/.github/workflows/pyo3.yml @@ -75,7 +75,7 @@ jobs: PYO3_CI: 1 # Build some extension modules using PyO3 and test them using PyPy. - - name: Test PyO3 examples + - name: Run PyO3 Python test suite shell: bash working-directory: pyo3 run: nox -s test-py