Skip to content

Commit

Permalink
CI install rustdoc nightly with stable date version
Browse files Browse the repository at this point in the history
  • Loading branch information
SpriteOvO committed Jun 12, 2024
1 parent c69fc27 commit 82bac69
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,19 +134,25 @@ jobs:
run: ./.github/workflows/disable-bench-deps.sh
- name: Install dependencies
run: sudo bash ./.github/workflows/install-deps.sh
- name: Install Rust nightly
run: rustup toolchain install nightly
- name: Install Rust nightly (stable date version)
run: |
STABLE_DATE=$(rustdoc --version | perl -ne 'print $& if /\b\d{4}-\d{2}-\d{2}\b/')
echo "STABLE_DATE=$STABLE_DATE" >> $GITHUB_ENV
rustup toolchain install nightly-$STABLE_DATE
echo "Stable version: $(rustdoc --version)"
echo "Nightly version: $(rustdoc +nightly-$STABLE_DATE --version)"
- name: Restore cargo caches
uses: Swatinem/rust-cache@v1
- name: Run rustdoc
- name: Run rustdoc nightly-${{ env.STABLE_DATE }}
run: |
cd spdlog
# 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
cargo +nightly rustdoc --verbose -- -D warnings -A unexpected_cfgs -A rustdoc::broken-intra-doc-links
cargo +nightly rustdoc --all-features --verbose -- -D warnings -A unexpected_cfgs
cargo +nightly-${{ env.STABLE_DATE }} rustdoc --verbose -- -D warnings -A rustdoc::broken-intra-doc-links
cargo +nightly-${{ env.STABLE_DATE }} rustdoc --all-features --verbose -- -D warnings
cd ../spdlog-macros
cargo +nightly rustdoc --verbose -- -D warnings -A unexpected_cfgs -A rustdoc::broken-intra-doc-links
cargo +nightly rustdoc --all-features --verbose -- -D warnings -A unexpected_cfgs
cargo +nightly-${{ env.STABLE_DATE }} rustdoc --verbose -- -D warnings -A rustdoc::broken-intra-doc-links
cargo +nightly-${{ env.STABLE_DATE }} rustdoc --all-features --verbose -- -D warnings
check-msrv:
strategy:
Expand Down

0 comments on commit 82bac69

Please sign in to comment.