Skip to content

Commit

Permalink
Merge pull request tafia#402 from Mingun/build-benches
Browse files Browse the repository at this point in the history
Fix broken benchmarks and build them on CI so it will be hard to happened again
  • Loading branch information
Mingun committed Jun 23, 2022
2 parents 46b4d1d + 4991dc4 commit b686d3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ jobs:
- 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 (no features)
env:
LLVM_PROFILE_FILE: coverage/no-features-%p-%m.profraw
Expand Down
2 changes: 1 addition & 1 deletion benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ fn one_event(c: &mut Criterion) {
.check_comments(false)
.trim_text(true);
match r.read_event(&mut buf) {
Ok(Event::Start(ref e)) => nbtxt += e.unescaped().unwrap().len(),
Ok(Event::Start(ref e)) => nbtxt += e.len(),
something_else => panic!("Did not expect {:?}", something_else),
};

Expand Down

0 comments on commit b686d3d

Please sign in to comment.