@@ -79,15 +79,33 @@ jobs:
79
79
- uses : ./.github/actions/install-rust
80
80
with :
81
81
toolchain : nightly
82
- - run : cargo install cargo-fuzz
82
+ - run : cargo install cargo-fuzz --vers "^0.6"
83
83
- run : cargo fetch
84
84
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
91
109
92
110
# Install wasm32-unknown-emscripten target, and ensure `crates/wasi-common`
93
111
# compiles to Emscripten.
0 commit comments