forked from LPX55/evmos-rpc-benchmarking
-
Notifications
You must be signed in to change notification settings - Fork 2
64 lines (54 loc) · 1.69 KB
/
Bench.yaml
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:
push:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: Benchmark
steps:
- name: checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn dependencies
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run Benchmarks
run: yarn benchmark:debug
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2
with:
name: bench-logs
path: logs/
download_artifact:
needs: build
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: Download Build Artifact
uses: actions/download-artifact@v2
with:
name: bench-logs
path: logs/
- name: Commit and push if changed
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git add -A
git diff --quiet && git diff --staged --quiet || git commit -m "Update benchmark logs"
git push origin HEAD:master --follow-tags --force
env:
GH_PAT: ${{ secrets.GH_PAT }}