Skip to content

Commit

Permalink
fix: update MSRV version (#1381)
Browse files Browse the repository at this point in the history
* check rust version using cargo hack

* add rust-version

* taplo fmt

* cargo clippy

* fix typos

* fix parity-scale-codec dep

* check rust version for all targets and features

* use caret requirment for parity-scale-codec

* revert caret requirement

* rust-version to 1.79.0

* verify using cargo-msrv

* fix msrv ci

* add comment

* use updated action

* use cargo-binstall

* pass github token to cargo binstall

* rm redundant matrix

* use cargo nextest

* fix nextest run

* changelog entry

* update cargo lockfiles
  • Loading branch information
rnbguy authored Nov 29, 2024
1 parent 0357976 commit 5079b9d
Show file tree
Hide file tree
Showing 13 changed files with 174 additions and 178 deletions.
2 changes: 2 additions & 0 deletions .changelog/unreleased/breaking-changes/1382-update-msrv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [ibc] Update MSRV to `1.79.0`.
([\#1382](https://github.com/cosmos/ibc-rs/issues/1382))
50 changes: 18 additions & 32 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,46 +106,32 @@ jobs:
- name: Run cargo test
run: make test

test-msrv:
name: Test MSRV for `ibc` libraries
rust-version:
name: Check Rust version for `ibc` libraries
timeout-minutes: 30
env:
CARGO_MSRV_VERSION: 0.16.3
MSRV: 1.75.0
strategy:
matrix:
param:
[
{ os: ubuntu-latest, system: unknown-linux-gnu },
{ os: macos-latest, system: apple-darwin },
]
runs-on: ${{ matrix.param.os }}
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Download cargo-msrv
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: foresterre/cargo-msrv
version: "tags/v${{ env.CARGO_MSRV_VERSION }}"
file: "cargo-msrv-x86_64-${{ matrix.param.system }}-v${{ env.CARGO_MSRV_VERSION }}.tgz"

- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: taiki-e/install-action@v2
with:
toolchain: ${{ env.MSRV }}
tool: cargo-hack,cargo-binstall,cargo-nextest

- name: Install cargo-msrv
run: |
tar -xzf "cargo-msrv-x86_64-${{ matrix.param.system }}-v${{ env.CARGO_MSRV_VERSION }}.tgz"
mv "cargo-msrv-x86_64-${{ matrix.param.system }}-v${{ env.CARGO_MSRV_VERSION }}/cargo-msrv" ~/.cargo/bin
cargo msrv --version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: cargo binstall --no-confirm cargo-msrv

- name: Calculate MSRV
run: cargo msrv find --output-format minimal --min 1.68.0
- name: Verify and Test Rust version
run: |
cargo hack msrv verify --output-format=minimal --all-features
cargo hack --rust-version nextest run --all-targets --all-features --no-tests=pass
- name: Build with MSRV
uses: actions-rs/cargo@v1
with:
toolchain: ${{ env.MSRV }}
command: build
args: --all-features
- name: Find MSRV
if: ${{ failure() }}
run: cargo hack msrv find --min=1.75 --output-format=minimal --all-features
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ exclude = [
version = "0.56.0"
license = "Apache-2.0"
edition = "2021"
rust-version = "1.75.0"
rust-version = "1.79.0"
readme = "README.md"
repository = "https://github.com/cosmos/ibc-rs"
authors = [ "Informal Systems <[email protected]>" ]
Expand Down
Loading

0 comments on commit 5079b9d

Please sign in to comment.