Skip to content

Commit fc5d631

Browse files
author
Andrew J Westlake
committed
Fixing CI action, MSRV needed to be bumped for async-std runtime only
1 parent a121dff commit fc5d631

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,16 @@ jobs:
5757
- python-version: pypy-3.6
5858
platform: { os: "windows-latest", python-architecture: "x64" }
5959
include:
60-
# Test minimal supported Rust version
60+
# Test minimal supported Rust version (no async-std)
6161
- rust: 1.45.0
6262
python-version: 3.9
6363
platform: { os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" }
6464
msrv: "MSRV"
65+
# Test minimal supported Rust version (with async-std)
66+
- rust: 1.46.0
67+
python-version: 3.9
68+
platform: { os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" }
69+
msrv: "MSRV"
6570

6671
steps:
6772
- uses: actions/checkout@v2
@@ -87,13 +92,22 @@ jobs:
8792
- name: Build (no features)
8893
run: cargo build --no-default-features --verbose --target ${{ matrix.platform.rust-target }}
8994

95+
- name: Set variables
96+
id: setvars
97+
run: |
98+
if [[ "${{matrix.rust}} == "1.45.0" ]]; then
99+
echo "::set-env name=features::testing,attributes,tokio-runtime"
100+
else
101+
echo "::set-env name=features::testing,attributes,tokio-runtime,async-std-runtime"
102+
fi
103+
90104
- name: Build (all additive features)
91-
run: cargo build --all-features --verbose --target ${{ matrix.platform.rust-target }}
105+
run: cargo build --features=$features --verbose --target ${{ matrix.platform.rust-target }}
92106

93107
# Run tests (except on PyPy, because no embedding API).
94108
- if: matrix.python-version != 'pypy-3.6'
95109
name: Test
96-
run: cargo test --all-features --target ${{ matrix.platform.rust-target }}
110+
run: cargo test --features=$features --target ${{ matrix.platform.rust-target }}
97111

98112
- name: Install python test dependencies
99113
run: |

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Actions Status](https://github.com/awestlake87/pyo3-asyncio/workflows/CI/badge.svg)](https://github.com/awestlake87/pyo3-asyncio/actions)
44
[![codecov](https://codecov.io/gh/awestlake87/pyo3-asyncio/branch/master/graph/badge.svg)](https://codecov.io/gh/awestlake87/pyo3-asyncio)
55
[![crates.io](http://meritbadge.herokuapp.com/pyo3-asyncio)](https://crates.io/crates/pyo3-asyncio)
6-
[![minimum rustc 1.45](https://img.shields.io/badge/rustc-1.45+-blue.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html)
6+
[![minimum rustc 1.46](https://img.shields.io/badge/rustc-1.46+-blue.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html)
77

88
[Rust](http://www.rust-lang.org/) bindings for [Python](https://www.python.org/)'s [Asyncio Library](https://docs.python.org/3/library/asyncio.html). This crate facilitates interactions between Rust Futures and Python Coroutines and manages the lifecycle of their corresponding event loops.
99

@@ -183,4 +183,9 @@ Type "help", "copyright", "credits" or "license" for more information.
183183

184184
> Note that we are using `EventLoop.run_until_complete` here instead of the newer `asyncio.run`. That is because `asyncio.run` will set up its own internal event loop that `pyo3_asyncio` will not be aware of. For this reason, running `pyo3_asyncio` conversions through `asyncio.run` is not currently supported.
185185
>
186-
> This restriction may be lifted in a future release.
186+
> This restriction may be lifted in a future release.
187+
188+
## MSRV
189+
Currently the MSRV for this library is 1.46.0, _but_ if you don't need to use the `async-std-runtime`
190+
feature, you can use rust 1.45.0.
191+
> `async-std` depends on `socket2` which fails to compile under 1.45.0.

0 commit comments

Comments
 (0)