fix(release): Gate 4 now validates huggingface binary size (2.6MB) not CUDA binary (26MB)

- CUDA binaries include static CUDA runtime libraries (~26MB)
- Huggingface binaries are much smaller (~2.6MB)
- Gate 4 now rebuilds huggingface binary after Gate 2 CUDA build
- This ensures we validate the correct binary size for releases
- Fixes false-positive size limit failures in local validation

Signed-off-by: Michael A. Kuykendall <michaelallenkuykendall@gmail.com>
This commit is contained in:
Michael A. Kuykendall
2025-10-22 20:03:18 -05:00
parent 9458111349
commit 5e715e51a0

View File

@@ -99,11 +99,9 @@ gate_3() {
gate_4() {
echo "Checking binary size (20MB limit)..."
# Build if needed (use existing binary if available)
if [ ! -f "target/release/shimmy" ] && [ ! -f "target/release/shimmy.exe" ]; then
echo "Building release binary for size check..."
cargo build --release
fi
# Rebuild huggingface binary for size check (Gate 2 CUDA build is 26MB, huggingface is 2.6MB)
echo "Building huggingface binary for size validation..."
cargo build --release --no-default-features --features huggingface --quiet
# Check size (handle both Unix and Windows)
if [ -f "target/release/shimmy.exe" ]; then