diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46050b2..75362be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,18 @@ jobs: fail-fast: false # If one platform fails, allow the rest to keep testing. matrix: rust: [stable] - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t", "pypy-3.9", "pypy-3.10"] + python-version: + [ + "3.9", + "3.10", + "3.11", + "3.12", + "3.13", + "3.13t", + "3.14-dev", + "3.14t-dev", + "pypy-3.11", + ] platform: [ { @@ -66,10 +77,6 @@ jobs: rust-target: "x86_64-pc-windows-msvc", }, ] - exclude: - # PyPy doesn't release 32-bit Windows builds any more - - python-version: pypy-3.9 - platform: { os: "windows-latest", python-architecture: "x86" } include: # Test minimal supported Rust version - rust: 1.63.0 @@ -97,7 +104,12 @@ jobs: # Test 32-bit windows just on latest Python - rust: stable python-version: "3.13" - platform: { os: "windows-latest", python-architecture: "x86", rust-target: "i686-pc-windows-msvc" } + platform: + { + os: "windows-latest", + python-architecture: "x86", + rust-target: "i686-pc-windows-msvc", + } steps: - uses: actions/checkout@v4 @@ -126,9 +138,13 @@ jobs: - name: Build run: cargo build --features=${{env.features}} --verbose --target ${{ matrix.platform.rust-target }} - # uvloop doesn't compile under Windows and PyPy, nor for free-threaded Python - - if: ${{ matrix.platform.os != 'windows-latest' && !startsWith(matrix.python-version, 'pypy') && !endsWith(matrix.python-version, 't') }} - name: Install pyo3-asyncio test dependencies + # uvloop doesn't compile under + # Windows, https://github.com/MagicStack/uvloop/issues/536, + # nor PyPy, https://github.com/MagicStack/uvloop/issues/537 + # nor for free-threaded Python, see https://github.com/MagicStack/uvloop/issues/642 + # nor on 3.14, see https://github.com/MagicStack/uvloop/issues/637 + - if: ${{ matrix.platform.os != 'windows-latest' && !startsWith(matrix.python-version, 'pypy') && !endsWith(matrix.python-version, 't') && !startsWith(matrix.python-version, '3.14') }} + name: Install uvloop run: | python -m pip install -U uvloop diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0495866..141bbb2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,18 +4,31 @@ on: push: tags: - "v*" + workflow_dispatch: + inputs: + version: + description: The version to build jobs: release: + permissions: + id-token: write + runs-on: ubuntu-latest environment: release steps: - - name: Checkout repository - uses: actions/checkout@v4 + - uses: actions/checkout@v5 + with: + # The tag to build or the tag received by the tag event + ref: ${{ github.event.inputs.version || github.ref }} + persist-credentials: false - uses: dtolnay/rust-toolchain@stable + - uses: rust-lang/crates-io-auth-action@v1 + id: auth + - name: Publish to crates.io run: make publish env: - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} diff --git a/pytests/test_async_std_uvloop.rs b/pytests/test_async_std_uvloop.rs index 10477fc..f5b7c3a 100644 --- a/pytests/test_async_std_uvloop.rs +++ b/pytests/test_async_std_uvloop.rs @@ -12,6 +12,11 @@ fn main() -> pyo3::PyResult<()> { return Ok(()); } + // uvloop not yet supported on 3.14 + if py.version_info() >= (3, 14) { + return Ok(()); + } + let uvloop = py.import("uvloop")?; uvloop.call_method0("install")?; diff --git a/pytests/test_tokio_current_thread_uvloop.rs b/pytests/test_tokio_current_thread_uvloop.rs index 9ea8a4b..f82db17 100644 --- a/pytests/test_tokio_current_thread_uvloop.rs +++ b/pytests/test_tokio_current_thread_uvloop.rs @@ -21,6 +21,11 @@ fn main() -> pyo3::PyResult<()> { return Ok(()); } + // uvloop not yet supported on 3.14 + if py.version_info() >= (3, 14) { + return Ok(()); + } + let uvloop = py.import("uvloop")?; uvloop.call_method0("install")?; diff --git a/pytests/test_tokio_multi_thread_uvloop.rs b/pytests/test_tokio_multi_thread_uvloop.rs index 9921c09..620ca75 100644 --- a/pytests/test_tokio_multi_thread_uvloop.rs +++ b/pytests/test_tokio_multi_thread_uvloop.rs @@ -13,6 +13,11 @@ fn main() -> pyo3::PyResult<()> { return Ok(()); } + // uvloop not yet supported on 3.14 + if py.version_info() >= (3, 14) { + return Ok(()); + } + let uvloop = py.import("uvloop")?; uvloop.call_method0("install")?;