Skip to content

Commit

Permalink
Run benchmarks as tests in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dralley committed Jun 29, 2022
1 parent b9bed6f commit 84b2f3d
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ name: Rust
on: [push, pull_request]

jobs:
build:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check fmt
run: cargo fmt -- --check

test:
strategy:
matrix:
platform: [ubuntu-latest, windows-latest]
Expand All @@ -15,20 +22,24 @@ jobs:
RUSTFLAGS: -C instrument-coverage

steps:
- uses: actions/checkout@v3
- name: Install coverage reporter (llvm-tools-preview)
if: runner.os == 'Linux'
run: rustup component add llvm-tools-preview
- name: Install coverage reporter (grcov)
if: runner.os == 'Linux'
run: cargo install grcov
- uses: actions/checkout@v1

- name: Build
run: cargo build
- name: Build benchmarks
run: cargo bench --no-run
- name: Build benchmarks (compare)
working-directory: compare
run: cargo bench --no-run
- name: Run tests + benchmarks
run: cargo test --all-features --benches --tests

- name: Run tests (no features)
env:
LLVM_PROFILE_FILE: coverage/no-features-%p-%m.profraw
Expand Down Expand Up @@ -67,6 +78,4 @@ jobs:
flags: unittests
verbose: true
continue-on-error: true
- name: Check fmt
run: cargo fmt -- --check

0 comments on commit 84b2f3d

Please sign in to comment.