Run benchmark test #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |