forked from keep-starknet-strange/madara
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (60 loc) · 1.72 KB
/
benchmark.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
name: Benchmark
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
paths-ignore:
- ".github/**"
- "docs/**"
- "examples/**"
- ".*"
- "README.md"
pull_request:
branches: [main]
paths-ignore:
- ".github/**"
- "docs/**"
- "examples/**"
- ".*"
- "README.md"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
# post on the pull-request page
pull-requests: write
jobs:
benchmark:
runs-on: [self-hosted, linux, benchmark]
steps:
- uses: actions/checkout@v3
with:
clean: false
- name: Build tests and install benchmark projects
run: |-
cd tests
npm clean-install
npm run build
cd ../benchmarking
npm i
- name: Build madara in release mode
run: cargo build --workspace --release
- name: Run benchmark
run: |
cd benchmarking
npm run test:ci
- name: Compare result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: "customBiggerIsBetter"
output-file-path: ./benchmarking/reports/metrics.json
alert-threshold: "120%"
github-token: ${{ secrets.GITHUB_TOKEN }}
fail-on-alert: true
summary-always: ${{ github.ref == 'refs/heads/main' }}
comment-always: false
comment-on-alert: false
auto-push: ${{ github.ref == 'refs/heads/main' }}