From a5255465bd32f1b26b59e8c1503d0b0ba90c1029 Mon Sep 17 00:00:00 2001 From: Trangar Date: Sat, 11 Dec 2021 16:09:23 +0100 Subject: [PATCH] Made the CI also check the benchmarks, fixed compile issue in benchmarks (#449) --- .github/workflows/rust.yml | 11 ++++++++++- benches/inline.rs | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4501c29..0dc00b4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -4,7 +4,8 @@ "push": { "branches": [ "trunk", - "v*.x" + "v*.x", + "ci/*" ] }, "pull_request": { @@ -51,6 +52,14 @@ }, "name": "Run `cargo check`" }, + { + "uses": "actions-rs/cargo@v1", + "with": { + "command": "check", + "args": "--bench *" + }, + "name": "Run `cargo check` on benches" + }, { "uses": "actions-rs/cargo@v1", "with": { diff --git a/benches/inline.rs b/benches/inline.rs index dbb5fec..773ac8a 100644 --- a/benches/inline.rs +++ b/benches/inline.rs @@ -8,7 +8,7 @@ fn inline_decoder_claim_bytes_read(c: &mut Criterion) { c.bench_function("inline_decoder_claim_bytes_read", |b| { b.iter(|| { - let _: Vec = + let _: (Vec, usize) = black_box(bincode::decode_from_slice(black_box(&slice), config).unwrap()); }) });