Skip to content

Commit

Permalink
Add msrv checking in CI
Browse files Browse the repository at this point in the history
Update `rust-version` in `Cargo.toml` and add a CI job to enforce that.

Signed-off-by: Jiahao XU <[email protected]>
  • Loading branch information
NobodyXu committed Feb 5, 2024
1 parent 886baff commit 91338c6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,41 @@ jobs:
- run: cargo clippy --no-deps --all-targets
- run: cargo hack --all --feature-powerset --no-dev-deps check

msrv:
strategy:
fail-fast: false
matrix:
include:
- target: aarch64-apple-darwin
os: macos-14
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-pc-windows-msvc
os: windows-latest

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- run: |
rustup toolchain install $MSRV --profile minimal
rustup override set $MSRV
env:
MSRV: 1.75.0
= run: cargo -vV

- uses: Swatinem/rust-cache@v2

- run: cargo check

# Dummy job to have a stable name for the "all tests pass" requirement
tests-pass:
name: Tests pass
needs:
- test
- lint
- msrv
if: always() # always run even if dependencies fail
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
description = "The simple git interface for gix suitable for async context (with tokio)"
repository = "https://github.com/cargo-bins/cargo-binstall"
documentation = "https://docs.rs/simple-git"
rust-version = "1.65.0"
rust-version = "1.75.0"
authors = ["Jiahao XU <[email protected]>"]
license = "Apache-2.0 OR MIT"

Expand Down

0 comments on commit 91338c6

Please sign in to comment.