name: Check
on:
push:
branches:
- main
jobs:
check-all:
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@1.85
- name: test
run: |
mkdir out
dd if=/dev/urandom bs=1M count=6 status=none | cargo run --features cli -- -s 2MiB out/
for f in out/*; do
size=$(stat -c%s "$f")
if [ "$size" -ne $((2 * 1024 * 1024)) ]; then
echo "Error: $f is NOT 2MiB (size: $size bytes)"
exit 1
fi
done
echo "All files are 2MiB"