forked from 0xPolygonZero/zero-bin
-
Notifications
You must be signed in to change notification settings - Fork 2
86 lines (80 loc) · 2.84 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Run benchmark test
on:
workflow_dispatch:
inputs:
machine_type:
description: 'The GCE machine type. (See docs for complete list of machine types https://cloud.google.com/compute/docs/general-purpose-machines)'
default: 't2d-standard-60'
type: string
num_workers:
description: 'Number of zero-bin workers'
default: '100'
required: true
type: string
cpu_request:
description: 'The CPU request set for the workers'
default: '11'
required: true
type: string
cpu_limit:
description: 'The CPU limit set for the workers'
default: '11'
required: true
type: string
memory:
description: 'The memory set for the workers'
default: '32Gi'
required: false
type: string
block_start:
description: 'The block number to start the range of blocks to prove'
required: true
type: string
block_end:
description: 'The block number to end the range of blocks to prove. (Set to the same value as block_start to only prove 1 block)'
required: true
type: string
other_args:
description: 'Other text to append into the generated CSV file'
required: true
type: string
rpc_endpoint:
description: 'The RPC endpoint zero-bin will use'
required: false
default: 'IMX_RPC'
type: choice
options:
- IMX_RPC
- INTERNAL_RPC
jobs:
test:
name: Run benchmarks tests
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v2
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_ID }}
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
- name: Get GKE credentials
id: 'get-credentials'
uses: 'google-github-actions/get-gke-credentials@v2'
with:
cluster_name: 'immutable-prod'
location: 'us-central1'
- name: Run benchmark script
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_WORKLOAD_IDENTITY_ID: ${{ secrets.GCP_WORKLOAD_IDENTITY_ID }}
GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }}
run: >
./tools/run-benchmark.sh ${{ inputs.machine_type }} ${{ inputs.num_workers }} ${{ inputs.cpu_request }} ${{ inputs.cpu_limit }} ${{ inputs.memory }} ${{ inputs.memory }} ${{ inputs.block_start }} ${{ inputs.block_end }} ${{ inputs.other_args }} ${{ inputs.rpc_endpoint }}