Skip to content

Commit

Permalink
gce-github-runner test
Browse files Browse the repository at this point in the history
  • Loading branch information
aluon committed Nov 15, 2024
1 parent 2bb2d43 commit 8ce95a7
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 25 deletions.
74 changes: 74 additions & 0 deletions .github/runner-configs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"benchmark-n4-32": {
"runner_name": "benchmark-n4-32",
"machine_type": "n4-standard-32",
"disk_size": 500,
"boot_disk_type": "hyperdisk-balanced"
},
"benchmark-t2d-32": {
"runner_name": "benchmark-t2d-32",
"machine_type": "t2d-standard-32",
"disk_size": 500,
"boot_disk_type": "pd-ssd"
},
"benchmark-t2d-60": {
"runner_name": "benchmark-t2d-60",
"machine_type": "t2d-standard-60",
"disk_size": 500,
"boot_disk_type": "pd-ssd"
},
"benchmark-c3d-30": {
"runner_name": "benchmark-c3d-30",
"machine_type": "c3d-standard-30",
"disk_size": 500,
"boot_disk_type": "pd-ssd"
},
"benchmark-c3d-60": {
"runner_name": "benchmark-c3d-60",
"machine_type": "c3d-standard-60",
"disk_size": 500,
"boot_disk_type": "pd-ssd"
},
"benchmark-c3d-180": {
"runner_name": "benchmark-c3d-180",
"machine_type": "c3d-standard-180",
"disk_size": 500,
"boot_disk_type": "pd-ssd"
},
"benchmark-c4-32": {
"runner_name": "benchmark-c4-32",
"machine_type": "c4-standard-32",
"disk_size": 500,
"boot_disk_type": "hyperdisk-balanced"
},
"benchmark-c4-48": {
"runner_name": "benchmark-c4-48",
"machine_type": "c4-standard-48",
"disk_size": 500,
"boot_disk_type": "hyperdisk-balanced"
},
"benchmark-c4-96": {
"runner_name": "benchmark-c4-96",
"machine_type": "c4-standard-96",
"disk_size": 500,
"boot_disk_type": "hyperdisk-balanced"
},
"executor-benchmark-runner": {
"runner_name": "executor-benchmark-runner",
"machine_type": "t2d-standard-60",
"disk_size": 500,
"boot_disk_type": "pd-ssd"
},
"executor-benchmark-ext4": {
"runner_name": "executor-benchmark-ext4",
"machine_type": "t2d-standard-60",
"disk_size": 500,
"boot_disk_type": "pd-ssd"
},
"executor-benchmark-xfs": {
"runner_name": "executor-benchmark-xfs",
"machine_type": "t2d-standard-60",
"disk_size": 500,
"boot_disk_type": "pd-ssd"
}
}
5 changes: 4 additions & 1 deletion .github/workflows/execution-performance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
schedule:
- cron: "0 */4 * * *" # This runs every four hours

permissions:
id-token: write

jobs:
execution-performance:
if: | # Only run on each PR once an appropriate event occurs
Expand All @@ -22,7 +25,7 @@ jobs:
with:
GIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
RUNNER_NAME: executor-benchmark-runner
# Run all tests only on the scheduled cadence, or explicitly requested
# Run all tests only on the scheduled cadence, or explicitly requested
FLOW: ${{ (github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'CICD:run-execution-performance-full-test')) && 'CONTINUOUS' || 'LAND_BLOCKING' }}
# Ignore target determination if on the scheduled cadence, or explicitly requested
IGNORE_TARGET_DETERMINATION: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'CICD:run-execution-performance-test') || contains(github.event.pull_request.labels.*.name, 'CICD:run-execution-performance-full-test') }}
87 changes: 63 additions & 24 deletions .github/workflows/workflow-run-execution-performance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
description: The git SHA1 to test.
RUNNER_NAME:
required: false
default: executor-benchmark-runner
default: executor-benchmark-runner
type: string
FLOW:
required: false
Expand Down Expand Up @@ -45,21 +45,21 @@ on:
description: The git SHA1 to test.
RUNNER_NAME:
required: false
default: executor-benchmark-runner
default: executor-benchmark-runner
type: choice
options:
- executor-benchmark-runner
- executor-benchmark-ext4
- executor-benchmark-xfs
- benchmark-t2d-32
- benchmark-t2d-60
- benchmark-c3d-30
- benchmark-c3d-60
- benchmark-c3d-180
- benchmark-n4-32
- benchmark-c4-32
- benchmark-c4-48
- benchmark-c4-96
- executor-benchmark-runner
- executor-benchmark-ext4
- executor-benchmark-xfs
- benchmark-t2d-32
- benchmark-t2d-60
- benchmark-c3d-30
- benchmark-c3d-60
- benchmark-c3d-180
- benchmark-n4-32
- benchmark-c4-32
- benchmark-c4-48
- benchmark-c4-96
description: The name of the runner to use for the test. (which decides machine specs)
NUMBER_OF_EXECUTION_THREADS:
required: false
Expand All @@ -70,10 +70,10 @@ on:
required: false
default: LAND_BLOCKING
options:
- LAND_BLOCKING
- CONTINUOUS
- MAINNET
- MAINNET_LARGE_DB
- LAND_BLOCKING
- CONTINUOUS
- MAINNET
- MAINNET_LARGE_DB
type: choice
description: Which set of tests to run. MAINNET/MAINNET_LARGE_DB are for performance validation of mainnet nodes.
SKIP_MOVE_E2E:
Expand All @@ -90,9 +90,13 @@ on:
required: false
default: ADHOC
options:
- ADHOC
- ADHOC
type: choice
description: Test source (always adhoc from here)

permissions:
id-token: write

jobs:
# This job determines which tests to run
test-target-determinator:
Expand All @@ -105,11 +109,49 @@ jobs:
id: determine_test_targets
uses: ./.github/actions/test-target-determinator

create-runner:
if: ${{ inputs.IGNORE_TARGET_DETERMINATION || needs.test-target-determinator.outputs.run_execution_performance_test == 'true' }}
needs: test-target-determinator
runs-on: ubuntu-latest
outputs:
label: ${{ steps.create-runner.outputs.label }}
steps:
- uses: "actions/checkout@v4"

- uses: "google-github-actions/auth@v2"
with:
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: [email protected]
project_id: ${{ secrets.GCP_PROJECT_ID }}

- id: secrets
uses: "google-github-actions/get-secretmanager-secrets@v2"
with:
secrets: |-
token:aptos-ci/github-actions-repository-dispatch
- name: Set Runner Configuration
id: set-config
run: |
config=$(jq -r --arg name "${{ inputs.runner_name }}" '.[$name]' .github/runner-configs.json)
echo "disk_size=$(echo $config | jq -r '.disk_size')" >> $GITHUB_ENV
echo "machine_type=$(echo $config | jq -r '.machine_type')" >> $GITHUB_ENV
echo "boot_disk_type=$(echo $config | jq -r '.boot_disk_type')" >> $GITHUB_ENV
- id: create-runner
uses: related-sciences/[email protected]
with:
token: ${{ steps.secrets.outputs.token }}
project_id: ${{ secrets.GCP_PROJECT_ID }}
disk_size: ${{ env.disk_size }}
machine_type: ${{ env.machine_type }}
boot_disk_type: ${{ env.boot_disk_type }}

# Run single node execution performance tests
single-node-performance:
needs: test-target-determinator
needs: create-runner
timeout-minutes: 120
runs-on: ${{ inputs.RUNNER_NAME }}
runs-on: ${{ needs.create-runner.outputs.label }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -125,6 +167,3 @@ jobs:
shell: bash
run: TABULATE_INSTALL=lib-only pip install tabulate && FLOW="${{ inputs.FLOW }}" SOURCE="${{ inputs.SOURCE }}" RUNNER_NAME="${{ inputs.RUNNER_NAME }}" SKIP_MOVE_E2E="${{ inputs.SKIP_MOVE_E2E && '1' || '' }}" NUMBER_OF_EXECUTION_THREADS="${{ inputs.NUMBER_OF_EXECUTION_THREADS }}" testsuite/single_node_performance.py
if: ${{ (inputs.IGNORE_TARGET_DETERMINATION || needs.test-target-determinator.outputs.run_execution_performance_test == 'true') }}

- run: echo "Skipping single node execution performance! Unrelated changes detected."
if: ${{ !inputs.IGNORE_TARGET_DETERMINATION && needs.test-target-determinator.outputs.run_execution_performance_test != 'true' }}

0 comments on commit 8ce95a7

Please sign in to comment.