Skip to content

Commit ed3b5b6

Browse files
authored
Merge pull request #741 from fitzgen/ci-dont-run-full-fuzz-corpora
ci: don't run full fuzz corpora
2 parents 086ff63 + 4d83cc3 commit ed3b5b6

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

.github/workflows/main.yml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,33 @@ jobs:
7979
- uses: ./.github/actions/install-rust
8080
with:
8181
toolchain: nightly
82-
- run: cargo install cargo-fuzz
82+
- run: cargo install cargo-fuzz --vers "^0.6"
8383
- run: cargo fetch
8484
working-directory: ./fuzz
85-
# NB: the `-runs=0` means that libFuzzer won't generate new inputs, only run
86-
# the seeds from the corpus.
87-
- run: cargo fuzz run compile --release --debug-assertions -- -runs=0
88-
- run: cargo fuzz run instantiate --release --debug-assertions -- -runs=0
89-
- run: cargo fuzz run instantiate_translated --release --debug-assertions -- -runs=0
90-
- run: cargo fuzz run api_calls --release --debug-assertions -- -runs=0
85+
- run: cargo fuzz build --release --debug-assertions
86+
# Our corpora are too large to run in full on every pull request, they just
87+
# take too long. Instead, we sample some of them and make sure that running
88+
# our fuzzers over the sampled inputs still works OK.
89+
- run: |
90+
find fuzz/corpus/compile -type f \
91+
| shuf \
92+
| head -n 3000 \
93+
| xargs cargo fuzz run compile --release --debug-assertions
94+
- run: |
95+
find fuzz/corpus/instantiate -type f \
96+
| shuf \
97+
| head -n 2000 \
98+
| xargs cargo fuzz run instantiate --release --debug-assertions
99+
- run: |
100+
find fuzz/corpus/instantiate_translated -type f \
101+
| shuf \
102+
| head -n 1000 \
103+
| xargs cargo fuzz run instantiate_translated --release --debug-assertions
104+
- run: |
105+
find fuzz/corpus/api_calls -type f \
106+
| shuf \
107+
| head -n 100 \
108+
| xargs cargo fuzz run api_calls --release --debug-assertions
91109
92110
# Install wasm32-unknown-emscripten target, and ensure `crates/wasi-common`
93111
# compiles to Emscripten.

0 commit comments

Comments
 (0)