diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 843d086..f77460d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,9 +11,7 @@ env: jobs: build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 @@ -49,3 +47,18 @@ jobs: run: rustup target add mips64-unknown-linux-gnuabi64 && cargo miri setup --target mips64-unknown-linux-gnuabi64 - name: Test (miri big-endian) run: cargo miri test --target mips64-unknown-linux-gnuabi64 + fuzz: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + - name: Install cargo-fuzz + uses: baptiste0928/cargo-install@v3 + with: + crate: cargo-fuzz + locked: false + - name: Fuzz + run: RUST_BACKTRACE=1 cargo fuzz run fuzz -- -max_total_time=900 \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index e346d25..6cf91e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,3 +46,6 @@ features = [ "derive", "serde", "std" ] # TODO halfs speed of benches_borrowed::bench_bitcode_decode #[profile.bench] #lto = true + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] } \ No newline at end of file