18 lines
858 B
Bash
18 lines
858 B
Bash
#!/usr/bin/env bash
|
|
set -Eeuo pipefail
|
|
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
|
|
export CSR_BUILD_ID
|
|
CSR_BUILD_ID=$(python3 "$ROOT/scripts/release-manifest.py" --source-id)
|
|
cargo fmt --check --manifest-path "$ROOT/launcher/Cargo.toml"
|
|
for component in scanner gui; do
|
|
cargo fmt --check --manifest-path "$ROOT/$component/Cargo.toml"
|
|
cargo clippy --locked --manifest-path "$ROOT/$component/Cargo.toml" --all-targets -- -D warnings
|
|
cargo test --locked --manifest-path "$ROOT/$component/Cargo.toml"
|
|
cargo build --locked --release --manifest-path "$ROOT/$component/Cargo.toml"
|
|
done
|
|
python3 -m unittest discover -s "$ROOT/tests" -p 'test_*.py'
|
|
bash "$ROOT/tests/smoke.sh"
|
|
python3 "$ROOT/scripts/release-manifest.py" --create "$ROOT/build/release.json"
|
|
bash "$ROOT/scripts/build-standalone.sh"
|
|
echo "Validated standalone release: $CSR_BUILD_ID"
|