File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,21 @@ jobs:
103103 SCCACHE_GHA_ENABLED : " true"
104104 RUSTC_WRAPPER : " sccache"
105105 run : cargo test
106+ - name : Run benchmark
107+ if : matrix.os == 'ubuntu-latest'
108+ env :
109+ SCCACHE_GHA_ENABLED : " true"
110+ RUSTC_WRAPPER : " sccache"
111+ run : cargo bench -- --output-format bencher | tee bench.txt
112+ - name : Store benchmark result
113+ if : matrix.os == 'ubuntu-latest'
114+ uses : benchmark-action/github-action-benchmark@v1
115+ with :
116+ tool : " cargo"
117+ output-file-path : bench.txt
118+ summary-always : true
119+ comment-on-alert : true
120+ github-token : ${{ secrets.GITHUB_TOKEN }}
106121
107122 build_linux_wheels :
108123 name : Build wheels (linux)
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ crate-type = [
1212 " rlib" , # for benchmarking
1313]
1414name = " unblob"
15+ # disable Rust nightly benchmark feature. We use criterion
16+ # https://bheisler.github.io/criterion.rs/book/faq.html#cargo-bench-gives-unrecognized-option-errors-for-valid-command-line-options
17+ bench = false
1518
1619[dependencies ]
1720log = " 0.4.22"
You can’t perform that action at this time.
0 commit comments