check that benches build (#2675)

# Objective

- Fixes #2674 
- Check that benches build

## Solution

- Adds a job that runs `cargo check --benches`


Co-authored-by: Carter Anderson <mcanders1@gmail.com>
This commit is contained in:
François 2021-08-26 00:40:56 +00:00
parent f38a6e670b
commit f6b42b8669
3 changed files with 26 additions and 2 deletions

1
.github/bors.toml vendored
View file

@ -13,6 +13,7 @@ status = [
"check-missing-examples-in-docs",
"check-unused-dependencies",
"ci",
"check-benches",
]
use_squash_merge = true

View file

@ -70,6 +70,29 @@ jobs:
# See tools/ci/src/main.rs for the commands this runs
run: cargo run -p ci
check-benches:
runs-on: ubuntu-latest
needs: ci
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-check-benches-${{ hashFiles('**/Cargo.toml') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: Check Benches
run: cd benches && cargo check --benches
build-wasm:
strategy:
matrix:

View file

@ -13,8 +13,8 @@ criterion_group!(
fake_commands,
zero_sized_commands,
medium_sized_commands,
large_sized_commands
get_or_spawn,
large_sized_commands,
get_or_spawn
);
criterion_main!(benches);