1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: ci
on:
push:
branches:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo test
- run: cargo clippy --all-targets -- -D warnings
- run: cargo fmt --check
- run: cargo doc --no-deps
env:
RUSTDOCFLAGS: -D warnings
- name: DB size gate (fixture sidecars < 5 MiB, no checked-in sidecars)
run: |
set -euo pipefail
cargo build --bin binscout
cap=$((5 * 1024 * 1024))
tmp=$(mktemp -d)
for f in tests/fixtures/pe32-basic.exe tests/fixtures/pe32-ordinals.exe tests/fixtures/text-garbage.bin tests/fixtures/raw-x64.bin; do
db="$tmp/$(basename "$f").redb"
./target/debug/binscout --db "$db" load "$f" > /dev/null
size=$(wc -c < "$db")
echo "$f -> $size bytes (cap $cap)"
if [ "$size" -gt "$cap" ]; then
echo "DB size gate failed: $f snapshot is $size bytes, over the $cap-byte cap"
exit 1
fi
done
if git ls-files | grep -q '\.rsdbg\.redb$'; then
echo "DB size gate failed: checked-in *.rsdbg.redb sidecars must not exist"
git ls-files | grep '\.rsdbg\.redb$'
exit 1
fi