-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.12 KB
/
ci-bench.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: CI Benchmarks
on: push
# push:
# branches:
# - master
env:
CARGO_TERM_COLOR: always
permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
# cancel in-progress job when a new push is performed
concurrency:
group: ci-bench-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
benchmark:
name: Performance benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Run benchmark
run: |
cd examples
./run_benchmarks.sh
cd ..
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: CN Benchmarks
tool: 'customSmallerIsBetter'
output-file-path: examples/benchmark_results.json
# Access token to deploy GitHub Pages branch
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
auto-push: true