Skip to content

Commit

Permalink
just use cargo add to set MSRV versions
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed Oct 25, 2024
1 parent 773c60b commit bf924f3
Showing 1 changed file with 3 additions and 29 deletions.
32 changes: 3 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,7 @@ 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",
"pypy-3.9",
]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy-3.9"]
platform:
[
{
Expand Down Expand Up @@ -123,27 +115,9 @@ jobs:
target: ${{ matrix.platform.rust-target }}

- if: ${{ matrix.msrv == 'MSRV' }}
name: Unify MSRV dependencies
run: |
import toml
cargo_toml = toml.load("Cargo.toml")
cargo_toml["dependencies"]["tokio"]["version"] = "1.38.1"
with open("Cargo.toml", "w") as f:
toml.dump(cargo_toml, f)
shell: python
- if: ${{ matrix.msrv == 'MSRV' }}
name: Generate lockfile
run: cargo generate-lockfile
- if: ${{ matrix.msrv == 'MSRV' }}
name: Unify dependencies to MSRV-compatible versions
name: Set MSRV dependencies
run: |
import tomllib
import subprocess
cargo_lock = tomllib.load(open("Cargo.lock", 'rb'))
for pkg in cargo_lock["package"]:
pkg_id = pkg["name"] + ":" + pkg["version"]
if pkg["name"] == "tokio" and pkg["version"] != "1.38.1":
subprocess.run(["cargo", "update", "--package", pkg_id, "--precise", "1.38.1"], check=True)
cargo add tokio@=1.38.1
- name: Build (no features)
run: cargo build --no-default-features --verbose --target ${{ matrix.platform.rust-target }}
Expand Down

0 comments on commit bf924f3

Please sign in to comment.