Skip to content

Commit

Permalink
automate MSRV in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
nyurik authored and pvdrz committed Dec 1, 2024
1 parent e55cc8d commit 061cc5e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/bindgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,25 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Read crate metadata
id: metadata
run: echo "rust-version=$(sed -ne 's/rust-version *= *\"\(.*\)\"/\1/p' Cargo.toml)" >> $GITHUB_OUTPUT

- name: Install msrv for lib
uses: dtolnay/rust-toolchain@master
with:
# MSRV below is documented in Cargo.toml and README.md, please update those if you
# change this.
toolchain: 1.70.0
toolchain: ${{ steps.metadata.outputs.rust-version }}

- name: Test lib with msrv
run: cargo +1.70.0 test --package bindgen
run: cargo +${{ steps.metadata.outputs.rust-version }} test --package bindgen

- name: Install msrv for cli
uses: dtolnay/rust-toolchain@master
with:
# MSRV below is documented in Cargo.toml and README.md, please update those if you
# change this.
toolchain: 1.70.0
toolchain: ${{ steps.metadata.outputs.rust-version }}

- name: Test cli with msrv
run: cargo +1.70.0 build --package bindgen-cli
run: cargo +${{ steps.metadata.outputs.rust-version }} build --package bindgen-cli

minimal:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ default-members = [
]

[workspace.package]
# If you change this, also update README.md and msrv in .github/workflows/bindgen.yml
# If you change this, also update README.md
rust-version = "1.70.0"
edition = "2021"

Expand Down

0 comments on commit 061cc5e

Please sign in to comment.