Skip to content

Commit

Permalink
feat: specify msrv (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
rinde authored Jan 10, 2025
1 parent 3514aa9 commit dbc58de
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,18 @@ jobs:
shared-key: debug-build-nightly
- name: Lint
run: just lint "strict"

msrv-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: just, cargo-binstall
- run: echo "RUST_TOOLCHAIN=$(just rust-version)" >> $GITHUB_ENV
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt, clippy
- run: |
cargo binstall cargo-msrv
just verify-msrv
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ repository = "https://github.com/moia-oss/tinytime.rs"
documentation = "https://docs.rs/tinytime"
edition = "2021"
version = "0.12.7"
rust-version = "1.81.0"
license = "MIT OR Apache-2.0"

[features]
Expand Down
9 changes: 8 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ set quiet

rust_version := `sed -nr 's/channel = "(.*)"/\1/p' rust-toolchain.toml`
rust_nightly_version := `sed -nr 's/channel = "(.*)"/\1/p' rust-toolchain-nightly.toml`
msrv := `sed -nr 's/rust-version = "(.*)"/\1/p' Cargo.toml`

rust-version:
echo '{{rust_version}}'

rust-nightly-version:
echo '{{rust_nightly_version}}'

msrv:
echo '{{msrv}}'

test:
cargo test --workspace --all-targets --all-features
cargo test --workspace --doc
Expand All @@ -38,4 +42,7 @@ udeps:
cargo '+{{rust_nightly_version}}' udeps

install-nightly:
rustup toolchain install '{{rust_nightly_version}}'
rustup toolchain install '{{rust_nightly_version}}'

verify-msrv:
cargo msrv verify --all-features --ignore-lockfile

0 comments on commit dbc58de

Please sign in to comment.