#!/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-7 (minutes once the reference's caches are full) # FAULTS=1 scripts/ladder.sh and rung 8, the seeded faults # # Every rung but 7 needs the reference and its data (scripts/env.sh). 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 nice -n 19 cargo test --release -q --manifest-path "$ROOT/Cargo.toml" > /dev/null echo "cargo test: passed" for rung in 0 1 2 4 5 6 7; 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 8" "$ROOT/scripts/rung8.sh" | tail -6 fi echo "ladder: passed"