From 75c8ad66850fade7126ea745056b592c410f60ca Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Tue, 3 Dec 2019 13:27:18 -0800 Subject: [PATCH] CI: Run our fuzz targets on our corpora This doesn't have libFuzzer generate new inputs in CI, only verifies that we can still successfully process our existing seed inputs in each of our targets' corpora. --- .github/workflows/main.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 99378c5d0b..de395a1d0a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -62,6 +62,30 @@ jobs: name: doc-api path: target/doc + # Download our libFuzzer corpus and make sure that we can still handle all the + # inputs. + fuzz_corpora: + name: Fuzz Corpora + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/checkout@v1 + with: + repository: bytecodealliance/wasmtime-libfuzzer-corpus + path: ./wasmtime/fuzz/corpus + ref: refs/heads/master + - uses: ./.github/actions/install-rust + with: + toolchain: nightly + - run: cargo install cargo-fuzz + - run: cargo fetch + working-directory: ./fuzz + # NB: the `-runs=0` means that libFuzzer won't generate new inputs, only run + # the seeds from the corpus. + - run: cargo fuzz run compile -- -runs=0 + - run: cargo fuzz run instantiate -- -runs=0 + - run: cargo fuzz run instantiate_translated -- -runs=0 + # Perform all tests (debug mode) for `wasmtime`. This runs stable/beta/nightly # channels of Rust as well as macOS/Linux/Windows. test: