Make the fuzzing CI job faster (#1727)

* CI: Only build fuzz targets, don't run them over the corpora

We've only ever caught a single potential regression by running the fuzz targets
over a sample of their corpora. However, this is also our slowest CI
job. Running the fuzz targets over their corpora simply isn't paying for itself.

Instead, just ensure that we can build the fuzz targets with `cargo fuzz` and
all of the libFuzzer and sanitizer instrumentation that it enables. This will
ensure that we don't break the fuzz targets, and we leave finding regressions in
the fuzz corpora to oss-fuzz.

* fuzz: feature gate peepmatic's fuzz targets

This makes it so that the CI's fuzz target-building job doesn't build peepmatic,
and transitively Z3.
This commit is contained in:
Nick Fitzgerald
2020-05-19 13:27:52 -07:00
committed by GitHub
parent 26e0629795
commit 5c39b74eb8
2 changed files with 13 additions and 83 deletions

View File

@@ -14,7 +14,7 @@ cranelift-reader = { path = "../cranelift/reader" }
cranelift-wasm = { path = "../cranelift/wasm" }
libfuzzer-sys = "0.3.2"
target-lexicon = "0.10"
peepmatic-fuzzing = { path = "../cranelift/peepmatic/crates/fuzzing" }
peepmatic-fuzzing = { path = "../cranelift/peepmatic/crates/fuzzing", optional = true }
wasmtime = { path = "../crates/wasmtime" }
wasmtime-fuzzing = { path = "../crates/fuzzing" }
@@ -35,21 +35,21 @@ name = "instantiate_translated"
path = "fuzz_targets/instantiate_translated.rs"
test = false
doc = false
required-features = ['binaryen']
required-features = ["binaryen"]
[[bin]]
name = "api_calls"
path = "fuzz_targets/api_calls.rs"
test = false
doc = false
required-features = ['binaryen']
required-features = ["binaryen"]
[[bin]]
name = "differential"
path = "fuzz_targets/differential.rs"
test = false
doc = false
required-features = ['binaryen']
required-features = ["binaryen"]
[[bin]]
name = "spectests"
@@ -62,30 +62,35 @@ name = "peepmatic_simple_automata"
path = "fuzz_targets/peepmatic_simple_automata.rs"
test = false
doc = false
required-features = ["peepmatic-fuzzing"]
[[bin]]
name = "peepmatic_fst_differential"
path = "fuzz_targets/peepmatic_fst_differential.rs"
test = false
doc = false
required-features = ["peepmatic-fuzzing"]
[[bin]]
name = "peepmatic_parser"
path = "fuzz_targets/peepmatic_parser.rs"
test = false
doc = false
required-features = ["peepmatic-fuzzing"]
[[bin]]
name = "peepmatic_compile"
path = "fuzz_targets/peepmatic_compile.rs"
test = false
doc = false
required-features = ["peepmatic-fuzzing"]
[[bin]]
name = "peepmatic_interp"
path = "fuzz_targets/peepmatic_interp.rs"
test = false
doc = false
required-features = ["peepmatic-fuzzing"]
[features]
binaryen = ['wasmtime-fuzzing/binaryen']
binaryen = ["wasmtime-fuzzing/binaryen"]