-
Notifications
You must be signed in to change notification settings - Fork 3.7k
169 lines (158 loc) · 6.04 KB
/
workflow-run-execution-performance.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
name: "*run execution-performance reusable workflow"
on:
# This allows the workflow to be triggered from another workflow
workflow_call:
inputs:
GIT_SHA:
required: true
type: string
description: The git SHA1 to test.
RUNNER_NAME:
required: false
default: executor-benchmark-runner
type: string
FLOW:
required: false
default: CONTINUOUS
type: string
description: Which set of tests to run.
IGNORE_TARGET_DETERMINATION:
required: false
default: false
type: boolean
description: Ignore target determination and run the tests
SKIP_MOVE_E2E:
required: false
default: false
type: boolean
description: Whether to run or skip move-only e2e tests at the beginning.
SOURCE:
required: false
default: CI
type: string
NUMBER_OF_EXECUTION_THREADS:
required: false
default: "32"
type: string
# This allows the workflow to be triggered manually from the Github UI or CLI
# NOTE: because the "number" type is not supported, we default to 720 minute timeout
workflow_dispatch:
inputs:
GIT_SHA:
required: true
type: string
description: The git SHA1 to test.
RUNNER_NAME:
required: false
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
description: The name of the runner to use for the test. (which decides machine specs)
NUMBER_OF_EXECUTION_THREADS:
required: false
default: "32"
type: string
description: Number of execution threads to use for the tests.
FLOW:
required: false
default: LAND_BLOCKING
options:
- 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:
required: false
default: false
type: boolean
description: Whether to skip move-only e2e tests at the beginning.
IGNORE_TARGET_DETERMINATION:
required: false
default: true
type: boolean
description: Ignore target determination and run the tests
SOURCE:
required: false
default: ADHOC
options:
- 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:
runs-on: ubuntu-latest
outputs:
run_execution_performance_test: ${{ steps.determine_test_targets.outputs.run_execution_performance_test }}
steps:
- uses: actions/checkout@v4
- name: Run the test target determinator
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: create-runner
timeout-minutes: 120
runs-on: ${{ needs.create-runner.outputs.label }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.GIT_SHA }}
if: ${{ inputs.IGNORE_TARGET_DETERMINATION || needs.test-target-determinator.outputs.run_execution_performance_test == 'true' }}
- uses: aptos-labs/aptos-core/.github/actions/rust-setup@main
with:
GIT_CREDENTIALS: ${{ secrets.GIT_CREDENTIALS }}
if: ${{ inputs.IGNORE_TARGET_DETERMINATION || needs.test-target-determinator.outputs.run_execution_performance_test == 'true' }}
- name: Run single node execution benchmark in performance build mode
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') }}