Delete blob and add CI check (#867)

* Delete blob and add CI check

* fix

* shellcheck
This commit is contained in:
Andrea Fioraldi 2022-10-27 16:20:29 +02:00 committed by GitHub
parent ebdab32b36
commit 40269a578b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 0 deletions

View File

@ -30,6 +30,11 @@ jobs:
crate: mdbook-linkcheck crate: mdbook-linkcheck
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- name: Install mimetype
- run: sudo apt-get install libfile-mimeinfo-perl
- name: Check for binary blobs
if: runner.os == 'Linux'
run: ./scripts/check_for_blobs.sh
- name: Build libafl debug - name: Build libafl debug
run: cargo build -p libafl run: cargo build -p libafl
- name: Build the book - name: Build the book

Binary file not shown.

19
scripts/check_for_blobs.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
blobs=$(find . -type f -exec sh -c '
for f; do
mimetype -b "$f" | grep -Eq "application/(x-object|x-executable)" &&
printf "%s\n" "$f"
done
' sh {} +)
if [ -z "$blobs" ]
then
echo "No object or executable files in the root directory"
exit 0
else
echo "Hey! There are some object or executable file in the root directory!"
echo "$blobs"
echo "Aborting."
exit 1
fi