From 62affb094727f26da609d8a65afd337ae7117c99 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Fri, 5 Jul 2024 22:47:11 +0200 Subject: [PATCH] Fuzz every target --- .github/workflows/fuzz.yml | 14 ++++++++++++-- fuzz/Cargo.toml | 3 +++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml index cba7d90..256540b 100644 --- a/.github/workflows/fuzz.yml +++ b/.github/workflows/fuzz.yml @@ -9,6 +9,16 @@ on: jobs: fuzzing: runs-on: ubuntu-latest + strategy: + 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 @@ -22,10 +32,10 @@ jobs: - name: Run Fuzzing run: | - cargo fuzz run fuzz_amf0_body -- -max_total_time=180 + cargo fuzz run ${{ matrix.target }} ${{ contains(matrix.target, 'amf3') && '--features amf3' || ''}} -- -max_total_time=180 - uses: actions/upload-artifact@v4 if: failure() with: - name: fuzz-failures + name: ${{ matrix.target }} path: fuzz/artifacts/ \ No newline at end of file diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index b4ddc16..af42e6f 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -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 = ["."]