-
Notifications
You must be signed in to change notification settings - Fork 140
62 lines (59 loc) · 1.92 KB
/
criterion_benchs.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: CI
on:
push:
branches: [ main ]
permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
jobs:
criterion_bench:
name: Criterion benches (Ubuntu)
runs-on: ubuntu-20.04
env:
CARGO_TERM_COLOR: always
steps:
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: actions/checkout@v3
- name: Run benchmark
run: |
cargo bench --no-fail-fast --bench "criterion_fft" \
--bench "criterion_polynomial" \
-- --output-format bencher | tee output.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'cargo'
output-file-path: output.txt
benchmark-data-dir-path: "./bench"
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
auto-push: ${{ github.event_name != 'pull_request' }}
criterion_bench_macos:
name: Criterion benches (macOS, Apple sillicon)
runs-on: [self-hosted, macOS]
env:
CARGO_TERM_COLOR: always
steps:
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: actions/checkout@v3
- name: Run benchmark
run: |
cargo bench -F metal --no-fail-fast --bench "criterion_metal" \
-- --output-format bencher | tee output.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'cargo'
output-file-path: output.txt
benchmark-data-dir-path: "./bench"
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
auto-push: ${{ github.event_name != 'pull_request' }}