Fix CI (downgrade a dependency for MSRV build)

This commit is contained in:
Maybe Waffle 2024-03-02 23:30:15 +01:00
parent ecb7ea563f
commit 3566002c2d

View file

@ -108,6 +108,22 @@ jobs:
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2
# Generally MSRV dump is not considered a breaking change in by the Rust community.
# Thus a minor or a patch version dump of a dependency of ours, can bump MSRV.
# (remember that `cargo` uses newest semver compatible versions by default)
#
# It's silly to bump MSRV every time minor dependency update does (note that this update can
# happen even after our crate is published; so users may need to downgrade crates in
# `Cargo.lock` independently of how we test our crates), so we downgrade their versions in
# MSRV CI specifically instead. This allows as to
# 1. Not update MSRV unless we really need to
# 2. Test newest (or at least newer) versions of crates in CI
- name: Downgrade deps for MSRV
if: ${{ matrix.rust == 'msrv' }}
run: |
cargo update -p atomic-write-file@0.1.3 --precise 0.1.2
# NB. Don't test (build) examples so we can use non-msrv features in them (--tests/--doc)
- name: Compile
run: |