feat: establish standalone Argand Site Registry
This commit is contained in:
commit
2a0fe1714b
60 changed files with 10494 additions and 0 deletions
28
scripts/check.sh
Normal file
28
scripts/check.sh
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
# By Nic Weyand! Run from a checkout or an extracted source release.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
||||
export CARGO_BUILD_JOBS="${CARGO_BUILD_JOBS:-2}"
|
||||
export CARGO_TERM_COLOR=never
|
||||
registry_check_root="${ARGAND_REGISTRY_CHECK_OUTPUT:-$(mktemp -d -t site-registry-check.XXXXXXXX)}"
|
||||
mkdir -p "$registry_check_root"
|
||||
registry_check_root="$(cd "$registry_check_root" && pwd)"
|
||||
if [[ -e "$registry_check_root/fixture" ]]; then
|
||||
echo 'Choose a new check output directory; fixture evidence is never overwritten.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cargo fmt --all -- --check
|
||||
cargo check --workspace --all-targets --locked --offline
|
||||
cargo clippy --workspace --all-targets --locked --offline -- -D warnings
|
||||
ARGAND_REGISTRY_E2E_OUTPUT="$registry_check_root/fixture" \
|
||||
cargo test --workspace --locked --offline
|
||||
RUSTDOCFLAGS="${RUSTDOCFLAGS:-} -D warnings" \
|
||||
cargo doc --workspace --no-deps --locked --offline
|
||||
python3 -m unittest discover -s tests -v
|
||||
cargo build --workspace --bins --examples --locked --offline
|
||||
cargo metadata --no-deps --format-version 1 --locked --offline > "$registry_check_root/metadata.json"
|
||||
registry_target="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["target_directory"])' "$registry_check_root/metadata.json")"
|
||||
python3 scripts/check_consumers.py --binary "$registry_target/debug/argand-site-registry" \
|
||||
--rust-example "$registry_target/debug/examples/lookup" --fixture "$registry_check_root/fixture"
|
||||
echo "All checks passed. Synthetic fixture evidence: $registry_check_root"
|
||||
Loading…
Add table
Add a link
Reference in a new issue