@@ -134,19 +134,26 @@ jobs:
134
134
run : ./.github/workflows/disable-bench-deps.sh
135
135
- name : Install dependencies
136
136
run : sudo bash ./.github/workflows/install-deps.sh
137
- - name : Install Rust nightly
138
- run : rustup toolchain install nightly
137
+ - name : Install Rust nightly (stable date version)
138
+ id : install-rust
139
+ run : |
140
+ STABLE_DATE=$(rustdoc --version | perl -ne 'print $& if /\b\d{4}-\d{2}-\d{2}\b/')
141
+ echo "stable_date=$STABLE_DATE" >> $GITHUB_OUTPUT
142
+
143
+ rustup toolchain install nightly-$STABLE_DATE
144
+
145
+ echo "Stable version: $(rustdoc --version)"
146
+ echo "Near stable nightly version: $(rustdoc +nightly-$STABLE_DATE --version)"
139
147
- name : Restore cargo caches
140
148
uses : Swatinem/rust-cache@v1
141
- - name : Run rustdoc
149
+ - name : Run rustdoc nightly-${{ steps.install-rust.outputs.stable_date }}
142
150
run : |
143
151
cd spdlog
144
- # The reason for allowing lint `unexpected_cfgs` not in `build.rs` or `Cargo.toml` but only in CI is that we need to keep MSRV
145
- cargo +nightly rustdoc --verbose -- -D warnings -A unexpected_cfgs -A rustdoc::broken-intra-doc-links
146
- cargo +nightly rustdoc --all-features --verbose -- -D warnings -A unexpected_cfgs
152
+ cargo +nightly-${{ steps.install-rust.outputs.stable_date }} rustdoc --verbose -- -D warnings -A rustdoc::broken-intra-doc-links
153
+ cargo +nightly-${{ steps.install-rust.outputs.stable_date }} rustdoc --all-features --verbose -- -D warnings
147
154
cd ../spdlog-macros
148
- cargo +nightly rustdoc --verbose -- -D warnings -A unexpected_cfgs -A rustdoc::broken-intra-doc-links
149
- cargo +nightly rustdoc --all-features --verbose -- -D warnings -A unexpected_cfgs
155
+ cargo +nightly-${{ steps.install-rust.outputs.stable_date }} rustdoc --verbose -- -D warnings -A rustdoc::broken-intra-doc-links
156
+ cargo +nightly-${{ steps.install-rust.outputs.stable_date }} rustdoc --all-features --verbose -- -D warnings
150
157
151
158
check-msrv :
152
159
strategy :
0 commit comments