#!/usr/bin/env bash set -euo pipefail test "$(uname -s)" = Linux test "$(id -u)" != 0 printf 'Linux checks: uid=%s architecture=%s\n' "$(id -u)" "$(uname -m)" rustc --version cargo --version # Only source inputs are copied. Cargo output and all fixtures disappear with # the container; the host checkout is read-only and no personal tree is scanned. check_root=$(mktemp -d /tmp/sized-check.XXXXXX) cp /source/Cargo.toml /source/Cargo.lock "$check_root/" cp -R /source/src /source/tests /source/benches "$check_root/" cd "$check_root" cargo fmt --all -- --check cargo test --locked cargo test --locked --test linux_mount -- --ignored cargo clippy --locked --all-targets -- -D warnings cargo build --locked --release fixture_root=$(mktemp -d /tmp/sized-release.XXXXXX) printf 'Linux release smoke test\n' > "$fixture_root/payload" ./target/release/sized --version ./target/release/sized "$fixture_root" --threads 2 --one-file-system --apparent --format json printf 'Linux checks passed.\n'