Skip to content

Commit d0976dc

Browse files
committed
New benchmark workflow
1 parent 9ab93f4 commit d0976dc

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: New Benchmark
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
permissions:
9+
# Deployments permission to deploy GitHub pages website
10+
deployments: write
11+
# Contents permission to update benchmark contents in gh-pages branch
12+
contents: write
13+
14+
jobs:
15+
new-benchmark:
16+
name: Performance regression check
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/[email protected]
20+
21+
- name: Run benchmark
22+
run: |
23+
# TODO run the actual benchmarks
24+
cat << EOF> ./output.json
25+
[
26+
{
27+
"name": "My Custom Smaller Is Better Benchmark - CPU Load",
28+
"unit": "Percent",
29+
"value": 8
30+
},
31+
{
32+
"name": "My Custom Smaller Is Better Benchmark - Memory Used",
33+
"unit": "Megabytes",
34+
"value": 5,
35+
"range": "3",
36+
"extra": "Value for Tooltip: 25\nOptional Num #2: 100\nAnything Else!"
37+
}
38+
]
39+
EOF
40+
41+
- name: Store benchmark result
42+
uses: benchmark-action/[email protected]
43+
with:
44+
name: My Project Go Benchmark
45+
tool: 'customSmallerIsBetter'
46+
output-file-path: output.json
47+
github-token: ${{ secrets.GITHUB_TOKEN }}
48+
# Workflow will fail when an alert happens
49+
fail-on-alert: true
50+
# Push and deploy GitHub pages branch automatically
51+
auto-push: true
52+
# Enable alert commit comment
53+
comment-on-alert: true
54+
# Mention @rhysd in the commit comment
55+
alert-comment-cc-users: '@zeme-iohk'

0 commit comments

Comments
 (0)