Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSRV Check #6

Closed
eitsupi opened this issue Jan 23, 2024 · 2 comments · Fixed by #7
Closed

MSRV Check #6

eitsupi opened this issue Jan 23, 2024 · 2 comments · Fixed by #7

Comments

@eitsupi
Copy link
Contributor

eitsupi commented Jan 23, 2024

Since Rust on CRAN is always outdated, it is very useful to have MSRV confirmed on CI.
Like this: apache/arrow-rs#4490

@JosiahParry
Copy link
Owner

@eitsupi
Copy link
Contributor Author

eitsupi commented Jan 23, 2024

In short, just set package.rust-version in Cargo.toml and run cargo-msrv verify.
The arrow-rs repository required the CI to be run using a custom image, so that's what it is, but here's a faster version if there are no restrictions on the use of GitHub Action.

name: Check MSRV
on:
  push:
    branches:
      - main
    paths:
      - src/**/*.rs
      - Cargo.toml
  pull_request:
    branches:
      - main
    paths:
      - src/**/*.rs
      - Cargo.toml
  workflow_dispatch:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  test-min-rust-version:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: baptiste0928/cargo-install@v2
        with:
          crate: cargo-msrv
      - name: Verify minimum rust version
        run: cargo-msrv verify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants