Skip to content

Commit 8cc3510

Browse files
committed
CI check MSRV after downgrading dependencies to minimal versions
1 parent 65ed438 commit 8cc3510

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
steps:
3030
- name: Checkout repository
3131
uses: actions/checkout@v2
32-
- name: Install nightly
32+
- name: Install Rust nightly
3333
run: |
3434
rustup toolchain install nightly
3535
rustup component add rustfmt --toolchain nightly
@@ -69,7 +69,7 @@ jobs:
6969
- name: Install dependencies
7070
if: matrix.os == 'ubuntu-latest'
7171
run: sudo bash ./.github/workflows/install-deps.sh
72-
- name: Install nightly
72+
- name: Install Rust nightly
7373
run: |
7474
rustup toolchain install nightly
7575
rustup component add clippy --toolchain nightly
@@ -89,7 +89,7 @@ jobs:
8989
uses: actions/checkout@v2
9090
- name: Install dependencies
9191
run: sudo bash ./.github/workflows/install-deps.sh
92-
- name: Install nightly
92+
- name: Install Rust nightly
9393
run: rustup toolchain install nightly
9494
- name: Restore cargo caches
9595
uses: Swatinem/rust-cache@v1
@@ -100,7 +100,7 @@ jobs:
100100
cd ../spdlog-macros
101101
cargo +nightly rustdoc --all-features --verbose -- -D warnings
102102
103-
check:
103+
check-msrv:
104104
strategy:
105105
fail-fast: false
106106
matrix:
@@ -112,17 +112,18 @@ jobs:
112112
- name: Install dependencies (Linux)
113113
if: matrix.os == 'ubuntu-latest'
114114
run: sudo bash ./.github/workflows/install-deps.sh
115+
- name: Install Rust nightly
116+
run: rustup toolchain install nightly
115117
- name: Install Rust ${{ env.rust_minver }}
116118
run: rustup toolchain install ${{ env.rust_minver }}
117119
- name: Restore cargo caches
118120
uses: Swatinem/rust-cache@v1
119121
- name: Avoid dev-dependencies
120122
run: |
121123
# Some dev-dependencies require a newer version of Rust, but it doesn't matter for MSRV check
122-
# And the features they enable for their own dependencies may disrupt `cargo check` reporting obvious errors
123124
# This is a workaround for the cargo nightly option `-Z avoid-dev-deps`
124125
perl -pi -e 's/\[dev-dependencies]/[workaround-avoid-dev-deps]/g' ./spdlog/Cargo.toml
125-
- name: Run check for core with Rust latest
126-
run: cargo check --all-features --verbose
127-
- name: Run check for core with Rust ${{ env.rust_minver }} (MSRV check)
128-
run: cargo +${{ env.rust_minver }} check --all-features --verbose
126+
- name: Downgrade dependencies to minimal versions
127+
run: cargo +nightly update -Z minimal-versions
128+
- name: Check MSRV for core with Rust ${{ env.rust_minver }}
129+
run: cargo +${{ env.rust_minver }} check --locked --all-features --verbose

0 commit comments

Comments
 (0)