Skip to content

Commit bf924f3

Browse files
committed
just use cargo add to set MSRV versions
1 parent 773c60b commit bf924f3

File tree

1 file changed

+3
-29
lines changed

1 file changed

+3
-29
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,7 @@ jobs:
4747
fail-fast: false # If one platform fails, allow the rest to keep testing.
4848
matrix:
4949
rust: [stable]
50-
python-version:
51-
[
52-
"3.9",
53-
"3.10",
54-
"3.11",
55-
"3.12",
56-
"3.13",
57-
"pypy-3.9",
58-
]
50+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy-3.9"]
5951
platform:
6052
[
6153
{
@@ -123,27 +115,9 @@ jobs:
123115
target: ${{ matrix.platform.rust-target }}
124116

125117
- if: ${{ matrix.msrv == 'MSRV' }}
126-
name: Unify MSRV dependencies
127-
run: |
128-
import toml
129-
cargo_toml = toml.load("Cargo.toml")
130-
cargo_toml["dependencies"]["tokio"]["version"] = "1.38.1"
131-
with open("Cargo.toml", "w") as f:
132-
toml.dump(cargo_toml, f)
133-
shell: python
134-
- if: ${{ matrix.msrv == 'MSRV' }}
135-
name: Generate lockfile
136-
run: cargo generate-lockfile
137-
- if: ${{ matrix.msrv == 'MSRV' }}
138-
name: Unify dependencies to MSRV-compatible versions
118+
name: Set MSRV dependencies
139119
run: |
140-
import tomllib
141-
import subprocess
142-
cargo_lock = tomllib.load(open("Cargo.lock", 'rb'))
143-
for pkg in cargo_lock["package"]:
144-
pkg_id = pkg["name"] + ":" + pkg["version"]
145-
if pkg["name"] == "tokio" and pkg["version"] != "1.38.1":
146-
subprocess.run(["cargo", "update", "--package", pkg_id, "--precise", "1.38.1"], check=True)
120+
cargo add tokio@=1.38.1
147121
148122
- name: Build (no features)
149123
run: cargo build --no-default-features --verbose --target ${{ matrix.platform.rust-target }}

0 commit comments

Comments
 (0)