-
Notifications
You must be signed in to change notification settings - Fork 30
52 lines (47 loc) · 1.41 KB
/
evm-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
name: EVM benchmark
on:
pull_request:
branches:
- master
paths:
- core/vm/**
workflow_dispatch:
inputs:
oldCommit:
description: "Old commit hash"
required: true
types: string
newCommit:
description: "New commit hash"
required: true
types: string
concurrency:
group: benchmark-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
benchmark:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
OLD_COMMIT: ${{ inputs.oldCommit }}
NEW_COMMIT: ${{ inputs.newCommit }}
steps:
- name: 'Checkout Repo'
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c #v3.3.0
with:
fetch-depth: 0
- name: 'Setup Go'
uses: actions/setup-go@v5
with:
go-version: '1.20.10'
- name: 'Run EVM benchmark'
run: |
go install golang.org/x/perf/cmd/[email protected]
cd core/vm
if [[ ${{ github.event_name }} = "pull_request" ]]; then
../../script/benchstat.sh -f "-test.v -test.run=^$ -test.bench=BenchmarkEvm" \
-o $(git rev-parse --short origin/master) -n ${{ github.sha }} -c 10 -i
else
../../script/benchstat.sh -f "-test.v -test.run=^$ -test.bench=BenchmarkEvm" \
-o "$OLD_COMMIT" -n "$NEW_COMMIT" -c 10 -i
fi