actions-rs / toolchain

🛠️ GitHub Action for `rustup` commands
https://github.com/marketplace/actions/rust-toolchain
MIT License
585 stars 86 forks source link

use minimal supported rust version `rust-version` from Cargo.toml #206

Open EdJoPaTo opened 2 years ago

EdJoPaTo commented 2 years ago

Do the checklist before filing an issue:

Motivation

Rust 1.56 added the Cargo manifest key rust-version to indicate the minimal supported rust version (MSRV).

It would be nice to only configure this only in a single location and use it automatically from ci.

Workflow example

The big question is probably how this would be useful as a config.

Adding a special key for this might be easier to understand but is error prone and has many unclear states.

      - uses: actions-rs/toolchain@v1
        with:
          # Dont use the toolchain key
          # toolchain: nightly
          override: true
          msrv: true

providing a special value to the toolchain value is also not as nice as I would like it to be.

      - uses: actions-rs/toolchain@v1
        with:
          toolchain: rust-version
          override: true
est31 commented 2 years ago

Personally I'd like toolchain: msrv as you can already pass words like stable, nightly or beta to it. Then you can specify multiple toolchain versions in the matrix like [stable, beta, msrv] etc.