Mrmaxmeier cedcee01c0
CI: Build fuzzers with shared cargo target dir (#845)
* build fuzzers with shared cargo target dir

* Make external build scripts aware of CARGO_TARGET_DIR

* fix libmozjpeg fuzzer with shared target dir

* fix cargo-make default value for CARGO_TARGET_DIR

* avoid ./ in cargo-make for windows compat

* CI: cargo-hack's --feature-powerset is too powerful

* fuzzer_concolic: support CARGO_TARGET_DIR

* ci: install z3 to avoid building from source

* ci: update actions

* ci: test nightly features with nightly rust

* test_all_fuzzers: try pruning more compilation artifacts

* ci: fix nightly feature check

* ci: apply rust-cache action after checkout (d'oh)

The rust-cache action populates the checkout directory, which is promply
deleted by the checkout action during checkout.. whoops!
2022-10-20 21:38:58 +02:00

53 lines
963 B
TOML

# Variables
[env]
CARGO_TARGET_DIR = { value = "target", condition = { env_not_set = ["CARGO_TARGET_DIR"] } }
FUZZER_NAME='libfuzzer_stb_image_concolic'
# Compilers
[tasks.runtime]
linux_alias = "runtime_unix"
mac_alias = "unsupported"
windows_alias = "unsupported"
[tasks.runtime_unix]
condition = { files_not_exist = ["${CARGO_TARGET_DIR}/libSymRuntime.so"] }
script_runner = "@shell"
script = '''
cd runtime
cargo build --release
'''
# Build the fuzzer
[tasks.fuzzer]
linux_alias = "fuzzer_unix"
mac_alias = "unsupported"
windows_alias = "unsupported"
[tasks.fuzzer_unix]
dependencies = ["runtime"]
script_runner = "@shell"
script = '''
cd fuzzer
cargo build --release
'''
[tasks.test]
alias = "fuzzer"
[tasks.unsupported]
# Do nothing
script_runner = "@shell"
script='''
echo "Not supported on this platform."
'''
# Clean up
[tasks.clean]
# Disable default `clean` definition
clear = true
script='''
cd fuzzer
cargo clean
cd ../runtime
cargo clean
'''