Skip to content

Commit

Permalink
check that benches build (#2675)
Browse files Browse the repository at this point in the history
# Objective

- Fixes #2674 
- Check that benches build

## Solution

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


Co-authored-by: Carter Anderson <mcanders1@gmail.com>
  • Loading branch information
mockersf and cart committed Aug 26, 2021
1 parent f38a6e6 commit f6b42b8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/bors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ status = [
"check-missing-examples-in-docs",
"check-unused-dependencies",
"ci",
"check-benches",
]

use_squash_merge = true
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions benches/benches/bevy_ecs/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit f6b42b8

Please sign in to comment.