From 02eda6624d247618c4bd7ff61be50c16d42fe5a4 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Tue, 30 Jan 2024 16:22:29 +0100 Subject: [PATCH] Only test MSRV with minimal versions --- .github/workflows/rust.yml | 28 ++++++++++++++++------------ README.md | 5 ++--- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 729e0be..506ef5d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -37,8 +37,11 @@ jobs: run: cargo test --verbose verify-msrv: - runs-on: ubuntu-latest - name: verify minimum supported rust version (ubuntu) + strategy: + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + name: verify minimum supported rust version without cache (takes longer, but caching produces unexpected behaviour) timeout-minutes: 30 # we are using the `cargo-msrv` app @@ -47,14 +50,15 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Install foresterre/cargo-msrv without cache (takes longer, but caching produces unexpected behaviour) + - name: Install foresterre/cargo-msrv run: cargo install cargo-msrv - - name: Verify the Rustc version declared in `cargo.toml` without cache (takes longer, but caching produces unexpected behaviour) - run: | - rm -f Cargo.lock - cargo update - cargo-msrv verify + - uses: dtolnay/rust-toolchain@nightly + - name: Generate Cargo.lock with minimal-version dependencies + run: cargo -Zminimal-versions generate-lockfile + + - name: Verify the Rustc version declared in `Cargo.toml` with `minimal-versions` + run: cargo-msrv verify # github actions does not support big endian systems directly, but it does support QEMU. # so we use cross-rs, which uses QEMU internally. @@ -94,16 +98,16 @@ jobs: steps: - uses: actions/checkout@v2 - + - name: Cache Cargo Dependencies uses: Swatinem/rust-cache@v1.3.0 - + - name: Add wasm32 Target run: rustup target add wasm32-unknown-unknown - + - name: Build without default features run: cargo build --verbose --no-default-features --target wasm32-unknown-unknown - + - name: Run tests without default features run: cargo test --verbose --no-default-features diff --git a/README.md b/README.md index 62dc511..e172695 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,8 @@ Features include: ### Current Status > [!TIP] -> MSRV Note: This crate is now on Rust `1.70.0`. If you want to use the -> newest version of `exrs` with an older Rust version, you can still do that: -> By specifying a version `half = "2.1.0"` in your project, the crate will work with Rust `1.59.0`. +> MSRV Note: This crate is now on Rust `1.70.0`. +> If you want to use the newest version of `exrs` with an older Rust version, you can still do that, by forcing Rust to use a an older version of the `half` crate via `cargo update -p half --precise 2.2.1`. `half 2.3.0` and higher have an MSRV above 1.61. This library has matured quite a bit, but should still be considered incomplete. For example, deep data and DWA compression algorithms are not supported yet.