File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -348,8 +348,19 @@ jobs:
348348 run : bash scripts/public-api.sh
349349 - name : Verify lock files are up to date
350350 run : |
351- git diff --name-only
352- git diff --exit-code '**/public-api.lock'
351+ if ! git diff --quiet '**/public-api.lock'; then
352+ git diff -U0 '**/public-api.lock'
353+ echo ""
354+ echo ""
355+ echo "Changed files:"
356+ git diff --name-only '**/public-api.lock'
357+ echo ""
358+ echo ""
359+ echo "Public API lock files are out of date."
360+ echo "Run './scripts/public-api.sh' locally to"
361+ echo "regenerate them, then commit the changes."
362+ exit 1
363+ fi
353364
354365 rust-coverage :
355366 name : " Rust tests (coverage) (${{ matrix.suite }})"
Original file line number Diff line number Diff line change 44
55set -Eeu -o pipefail
66
7+ if ! rustup run nightly rustc --version & > /dev/null; then
8+ echo " Error: nightly toolchain is not installed."
9+ echo " ` cargo-public-api` requires nightly to build rustdoc JSON."
10+ echo " "
11+ echo " Install it with:"
12+ echo " rustup install nightly --profile minimal"
13+ echo " "
14+ echo " See https://crates.io/crates/cargo-public-api"
15+ exit 1
16+ fi
17+
18+ if ! cargo +nightly public-api --version & > /dev/null; then
19+ echo " Error: ` cargo-public-api` is not installed."
20+ echo " "
21+ echo " Install it with:"
22+ echo " cargo +stable install cargo-public-api --locked"
23+ echo " "
24+ echo " See https://crates.io/crates/cargo-public-api"
25+ exit 1
26+ fi
27+
728# Regenerate public-api.lock files for all published crates.
829# Uses cargo-public-api to dump the public API surface of each crate.
930#
You can’t perform that action at this time.
0 commit comments