#!/usr/bin/env bash # SPDX-License-Identifier: MIT # The gate: every rung in order; numbers and commits in docs/status.md. # # scripts/ladder.sh rungs 0-6 (a few minutes once the reference's caches are full) # FAULTS=1 scripts/ladder.sh and rung 7, the seeded faults # # fmt and clippy are CI's, and run here too when the rustup stable toolchain is present. set -euo pipefail ROOT=$(cd "$(dirname "$0")/.." && pwd) STABLE=${STABLE:-"$HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin"} if [ -x "$STABLE/cargo-clippy" ]; then PATH="$STABLE:$PATH" cargo fmt --check --manifest-path "$ROOT/Cargo.toml" PATH="$STABLE:$PATH" nice -n 19 cargo clippy -q --release --all-targets --manifest-path "$ROOT/Cargo.toml" -- -D warnings echo "fmt and clippy: clean" fi for rung in 0 1 2 4 5 6; do echo "== rung $rung" "$ROOT/scripts/rung$rung.sh" 2>/dev/null | grep -v "traces are identical\|: pass$\|summary identical" | tail -6 done if [ "${FAULTS:-0}" = 1 ]; then echo "== rung 7" "$ROOT/scripts/rung7.sh" | tail -6 fi echo "ladder: passed"