-
Notifications
You must be signed in to change notification settings - Fork 487
103 lines (88 loc) · 3.42 KB
/
benchmarks.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Benchmarks
concurrency:
group: benchmark-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
branches:
- master
push:
branches:
- master
permissions:
contents: write
jobs:
unit_fluvio_protocol:
name: Fluvio Protocol - Unit Benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust Cargo files
uses: Swatinem/rust-cache@v2
with:
# Additional non workspace directories, separated by newlines
key: benches-${{ runner.os }}-unit_fluvio_protocol-rust
- name: Cache Benchmark data
uses: actions/cache@v4
if: github.ref == 'refs/heads/master'
with:
path: ./benches_cache
key: benches-${{ runner.os }}-unit_fluvio_protocol
- name: Run Benchmarks
run: cargo bench -p fluvio-protocol -- --output-format bencher | tee fluvio_protocol_benches.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
if: github.ref == 'refs/heads/master'
with:
# What benchmark tool the output.txt came from
tool: 'cargo'
# Where the output from the benchmark tool is stored
output-file-path: fluvio_protocol_benches.txt
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Leave a job summary with benchmark result comparison
summary-always: true
# Where the previous data file is stored
external-data-json-path: ./benches_cache/benchmark-data.json
# Mention @infinyon/developers in the commit comment
alert-comment-cc-users: '@infinyon/developers'
unit_fluvio_smartmodule:
name: Fluvio SmartModule - Unit Benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust Cargo files
uses: Swatinem/rust-cache@v2
with:
# Additional non workspace directories, separated by newlines
key: benches-${{ runner.os }}-unit_fluvio_smartmodule-rust
- name: Cache Benchmark data
uses: actions/cache@v4
if: github.ref == 'refs/heads/master'
with:
path: ./benches_cache
key: benches-${{ runner.os }}-unit_fluvio_smartmodule
- name: Run Benchmarks
run: cargo bench -p fluvio-smartmodule -- --output-format bencher | tee fluvio_smartmodule_benches.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
if: github.ref == 'refs/heads/master'
with:
# What benchmark tool the output.txt came from
tool: 'cargo'
# Where the output from the benchmark tool is stored
output-file-path: fluvio_smartmodule_benches.txt
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Leave a job summary with benchmark result comparison
summary-always: true
# Where the previous data file is stored
external-data-json-path: ./benches_cache/benchmark-data.json
# Mention @infinyon/developers in the commit comment
alert-comment-cc-users: '@infinyon/developers'