Skip to content

Commit

Permalink
ci: Test Rust MSRV
Browse files Browse the repository at this point in the history
Add a job to build this crate (including tests) with the current Minimum
Supported Rust Version (MSRV): 1.63 (see #25).

Don't set a RUSTUP_TOOLCHAIN environment variable but a RUST_TOOLCHAIN
instead to avoid rustup warnings.

Signed-off-by: Mickaël Salaün <mic@digikod.net>
  • Loading branch information
l0kod committed Jan 27, 2023
1 parent f69888f commit 74adeb9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,26 @@ jobs:
- name: Run tests
run: rustup run stable cargo test --verbose

ubuntu_18_rust_msrv:
runs-on: ubuntu-18.04
env:
# sed -n 's/^rust-version = "\([0-9.]\+\)"$/\1/p' Cargo.toml
RUST_TOOLCHAIN: 1.63
steps:
- uses: actions/checkout@v3

- name: Install Rust MSRV
run: |
rm ~/.cargo/bin/{cargo-fmt,rustfmt} || :
rustup default ${{ env.RUST_TOOLCHAIN }}
rustup update
- name: Build
run: rustup run ${{ env.RUST_TOOLCHAIN }} cargo build --verbose

- name: Build tests
run: rustup run ${{ env.RUST_TOOLCHAIN }} cargo build --tests --verbose

ubuntu_20_rust_stable:
runs-on: ubuntu-20.04
env:
Expand Down

0 comments on commit 74adeb9

Please sign in to comment.