Skip to content

Commit f6b42b8

Browse files
mockersfcart
andcommitted
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 <[email protected]>
1 parent f38a6e6 commit f6b42b8

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

.github/bors.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ status = [
1313
"check-missing-examples-in-docs",
1414
"check-unused-dependencies",
1515
"ci",
16+
"check-benches",
1617
]
1718

1819
use_squash_merge = true

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,29 @@ jobs:
7070
# See tools/ci/src/main.rs for the commands this runs
7171
run: cargo run -p ci
7272

73+
check-benches:
74+
runs-on: ubuntu-latest
75+
needs: ci
76+
steps:
77+
- uses: actions/checkout@v2
78+
- uses: actions/cache@v2
79+
with:
80+
path: |
81+
~/.cargo/bin/
82+
~/.cargo/registry/index/
83+
~/.cargo/registry/cache/
84+
~/.cargo/git/db/
85+
target/
86+
key: ${{ runner.os }}-cargo-check-benches-${{ hashFiles('**/Cargo.toml') }}
87+
- uses: actions-rs/toolchain@v1
88+
with:
89+
toolchain: stable
90+
override: true
91+
- name: Install alsa and udev
92+
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
93+
- name: Check Benches
94+
run: cd benches && cargo check --benches
95+
7396
build-wasm:
7497
strategy:
7598
matrix:

benches/benches/bevy_ecs/commands.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ criterion_group!(
1313
fake_commands,
1414
zero_sized_commands,
1515
medium_sized_commands,
16-
large_sized_commands
17-
get_or_spawn,
16+
large_sized_commands,
17+
get_or_spawn
1818
);
1919
criterion_main!(benches);
2020

0 commit comments

Comments
 (0)