Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuzz slightly on CI #62

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Fuzz

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
fuzzing:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- fuzz_amf0_body
- fuzz_amf0_element_array
- fuzz_amf0_header
- fuzz_amf3_body
- fuzz_amf3_int_signed
- fuzz_amf3_int_unsigned
- fuzz_amf3_string
steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly

- name: Install cargo-fuzz
run: cargo install cargo-fuzz

- name: Run Fuzzing
run: |
cargo fuzz run ${{ matrix.target }} ${{ contains(matrix.target, 'amf3') && '--features amf3' || ''}} -- -max_total_time=180

- uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.target }}
path: fuzz/artifacts/
3 changes: 3 additions & 0 deletions fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ cargo-fuzz = true
libfuzzer-sys = "0.4.7"
flash-lso = { path = "../flash-lso", default-features = false}

[features]
amf3 = ["flash-lso/amf3"]

# Prevent this from interfering with workspaces
[workspace]
members = ["."]
Expand Down
Loading