Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ env:
CARGO_TERM_COLOR: always

jobs:
resolve:
runs-on: ubuntu-latest
outputs:
MSRV: ${{ steps.resolve-msrv.outputs.MSRV }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: resolve MSRV
id: resolve-msrv
run: echo MSRV=`python -c 'import tomllib; print(tomllib.load(open("Cargo.toml", "rb"))["package"]["rust-version"])'` >> $GITHUB_OUTPUT

fmt:
runs-on: ubuntu-latest
steps:
Expand All @@ -30,7 +43,7 @@ jobs:
- run: cargo clippy --all

build:
needs: [fmt] # don't wait for clippy as fails rarely and takes longer
needs: [resolve, fmt] # don't wait for clippy as fails rarely and takes longer
name: python${{ matrix.python-version }} ${{ matrix.os }} rust-${{ matrix.rust}}
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -43,7 +56,7 @@ jobs:
include:
- python-version: "3.13"
os: "ubuntu-latest"
rust: "1.63"
rust: ${{ needs.resolve.outputs.MSRV }}
- python-version: "3.13"
python-architecture: "arm64"
os: "macos-latest"
Expand All @@ -66,6 +79,12 @@ jobs:
- uses: Swatinem/rust-cache@v2
continue-on-error: true

- if: ${{ matrix.rust == needs.resolve.outputs.MSRV }}
name: Set dependencies on MSRV
run: cargo +stable update
env:
CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: fallback

- name: Test
run: cargo test --verbose

Expand Down
Loading