Skip to content

Commit

Permalink
ci: add benchmark against main
Browse files Browse the repository at this point in the history
  • Loading branch information
duesee committed Apr 13, 2024
1 parent 73b2356 commit 9512eaa
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 40 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/benchmark.yml

This file was deleted.

20 changes: 8 additions & 12 deletions .github/workflows/main.yml
Expand Up @@ -42,20 +42,16 @@ jobs:
- run: just test
- uses: ./.github/actions/cache_save

benchmark:
runs-on: ubuntu-latest
# benchmark:
# runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
# steps:
# - uses: actions/checkout@v4

- uses: ./.github/actions/cache_restore
- uses: actions/download-artifact@v4
continue-on-error: true
with:
name: bench
- run: cargo install just
- run: just coverage
- uses: ./.github/actions/cache_save
# - uses: ./.github/actions/cache_restore
# - run: cargo install just
# - run: just bench_against_main
# - uses: ./.github/actions/cache_save

coverage:
runs-on: ubuntu-latest
Expand Down
11 changes: 11 additions & 0 deletions justfile
Expand Up @@ -119,7 +119,18 @@ audit: cargo_deny

# Benchmark
bench:
cargo bench -p imap-codec --all-features bench_command_parse_simple

# Benchmark against main
bench_against_main:
rm -rf target/bench_tmp
mkdir -p target/bench_tmp
git clone --depth 1 https://github.com/duesee/imap-codec target/bench_tmp
cd target/bench_tmp; cargo bench -p imap-codec --all-features
rm -rf target/criterion
cp -r target/bench_tmp/target/criterion target/criterion
cargo bench -p imap-codec --all-features
rm -rf target/bench_tmp

# Measure test coverage
coverage: install_rust_llvm_tools_preview install_cargo_grcov
Expand Down

0 comments on commit 9512eaa

Please sign in to comment.