-
-
Notifications
You must be signed in to change notification settings - Fork 438
62 lines (56 loc) · 2.32 KB
/
benchmark.yml
File metadata and controls
62 lines (56 loc) · 2.32 KB
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
name: Benchmark
# Actions access a common cache entry and may corrupt it.
concurrency:
# If PR, cancel prev commits. head_ref = source branch name on pull_request, null if push
# if push, default to github.run_id so retries of the same commit do not overwrite each other
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
push:
branches:
- stable
- unstable
- benchmark # For debugging
pull_request:
branches:
- stable
- unstable
workflow_dispatch:
jobs:
run:
runs-on: buildjet-4vcpu-ubuntu-2204
# Skip for dependabot PRs, secrets are not made available and will fail
# Don't run on forks. Forks don't have access to the S3 credentials and the workflow will fail
if: |
github.actor != 'dependabot[bot]' &&
( github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository )
steps:
# <common-build> - Uses YAML anchors in the future
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: "./.github/actions/setup-and-build"
with:
node: 24
# </common-build>
# Restore performance downloaded states
- name: Restore performance state cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: packages/state-transition/test-cache
key: perf-states-${{ hashFiles('packages/state-transition/test/perf/params.ts') }}
- name: Run benchmarks
run: pnpm benchmark
env:
# To download content for tests
INFURA_ETH2_CREDENTIALS: ${{ secrets.INFURA_ETH2_CREDENTIALS }}
# To write to PRs and commits
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# benchmark options
BENCHMARK_S3: true
# S3 credentials
S3_ACCESS_KEY: ${{ secrets.S3_BENCH_LODESTAR_ACCESS_KEY }}
S3_SECRET_KEY: ${{ secrets.S3_BENCH_LODESTAR_SECRET_KEY }}
S3_REGION: ${{ secrets.S3_BENCH_LODESTAR_REGION }}
S3_BUCKET: ${{ secrets.S3_BENCH_LODESTAR_BUCKET }}
S3_ENDPOINT: ${{ secrets.S3_BENCH_LODESTAR_ENDPOINT }}
# Key prefix to separate benchmark data from multiple repositories
S3_KEY_PREFIX: ${{ github.repository }}/${{ runner.os }}