-
Notifications
You must be signed in to change notification settings - Fork 156
68 lines (58 loc) · 1.88 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
65
66
67
68
name: Benchmark
on:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
benchmark:
name: benchmark
runs-on: ubuntu-latest
environment: master_n_tags
container:
image: paritytech/node-wrk:latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: benchmarks
run: |
yarn --immutable
echo "Benchmarks for polkadot"
mkdir -p artifacts
yarn bench --log-level info --ws-url wss://rpc.polkadot.io
mv benchmarks.txt artifacts/
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: benchmarks
path: ./artifacts/
benchmark-publish:
name: benchmark publish
runs-on: ubuntu-latest
needs: [benchmark]
environment: master_n_tags
steps:
- name: Checkout sources
uses: actions/checkout@v4
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.GH_APP_SAS_APP_ID }}
private-key: ${{ secrets.GH_APP_SAS_APP_KEY }}
- name: download artifacts
uses: actions/download-artifact@v4
with:
name: benchmarks
path: artifacts
- name: Modify benches result for benhcmark action
run: ./scripts/ci/benchmarks/generate_benchmark_result.sh artifacts/benchmarks.txt > artifacts/benchmarks.json
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@d48d326b4ca9ba73ca0cd0d59f108f9e02a381c7 #1.20.4
with:
tool: "customSmallerIsBetter"
output-file-path: artifacts/benchmarks.json
# Push and deploy GitHub pages branch automatically
auto-push: true
github-token: ${{ steps.app-token.outputs.token }}