Files
sized/scripts/check-linux-container.sh
T
gamertan 67fe175ec7
Sized Linux checks / Linux AMD64 / Rust 1.88.0 (push) Failing after 5s
Run Sized Linux checks on the existing Gitea runner
2026-10-09 18:46:33 -04:00

28 lines
1.0 KiB
Bash
Executable File

#!/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)
source_root=${SIZED_TEST_SOURCE:-/source}
cp "$source_root/Cargo.toml" "$source_root/Cargo.lock" "$check_root/"
cp -R "$source_root/src" "$source_root/tests" "$source_root/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'