#!/usr/bin/env bash # SPDX-License-Identifier: MIT # The single gate (family charter: scripts/ladder.sh in the Rust tiers): every rung in order, # stopping at the first that fails. # # scripts/ladder.sh rungs 0-6 (a few minutes once the reference caches are # full; filling them the first time takes about 5 minutes) # FAULTS=1 scripts/ladder.sh and rung 7, the seeded faults # # Needs the reference clone at the pin (scripts/fetch_reference.sh), the reference's working # checkout beside this repository for its fetched data (scripts/env.sh), and its .venv-pypy. # fmt and clippy run 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" \ --target-dir "$ROOT/external/stable-target" -- -D warnings echo "fmt and clippy: clean" fi nice -n 19 cargo build --release -q --manifest-path "$ROOT/Cargo.toml" for rung in 0 1 2 3 4 5 6; do echo "== rung $rung" start=$(date +%s) "$ROOT/scripts/rung$rung.sh" | tail -8 echo " ($(( $(date +%s) - start )) s)" done if [ "${FAULTS:-0}" = 1 ]; then echo "== rung 7" "$ROOT/scripts/rung7.sh" | tail -3 fi echo "ladder: passed"