*run execution-performance reusable workflow #9
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 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 | |
IS_FULL_RUN: | |
required: false | |
default: false | |
type: boolean | |
description: Run complete version of the tests | |
PROFILE: | |
required: false | |
default: false | |
type: boolean | |
description: Generate profile reports | |
# 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 | |
description: The name of the runner to use for the test. | |
IS_FULL_RUN: | |
required: false | |
default: false | |
type: boolean | |
description: Run complete version of the tests | |
jobs: | |
# This job determines which files were changed | |
file_change_determinator: | |
runs-on: ubuntu-latest | |
outputs: | |
only_docs_changed: ${{ steps.determine_file_changes.outputs.only_docs_changed }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run the file change determinator | |
id: determine_file_changes | |
uses: ./.github/actions/file-change-determinator | |
# Run sequential execution performance tests | |
sequential-execution-performance: | |
needs: file_change_determinator | |
timeout-minutes: 30 | |
runs-on: ${{ inputs.RUNNER_NAME }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ inputs.GIT_SHA }} | |
if: ${{ needs.file_change_determinator.outputs.only_docs_changed != 'true' && inputs.IS_FULL_RUN }} | |
- uses: aptos-labs/aptos-core/.github/actions/rust-setup@main | |
with: | |
GIT_CREDENTIALS: ${{ secrets.GIT_CREDENTIALS }} | |
if: ${{ needs.file_change_determinator.outputs.only_docs_changed != 'true' && inputs.IS_FULL_RUN }} | |
- name: Run sequential execution benchmark in performance build mode | |
shell: bash | |
run: testsuite/sequential_execution_performance.py | |
if: ${{ needs.file_change_determinator.outputs.only_docs_changed != 'true' && inputs.IS_FULL_RUN }} | |
- run: echo "Skipping sequential execution performance!" | |
if: ${{ needs.file_change_determinator.outputs.only_docs_changed == 'true' || !inputs.IS_FULL_RUN }} | |
# Run parallel execution performance tests | |
parallel-execution-performance: | |
needs: file_change_determinator | |
timeout-minutes: 60 | |
runs-on: ${{ inputs.RUNNER_NAME }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ inputs.GIT_SHA }} | |
if: ${{ needs.file_change_determinator.outputs.only_docs_changed != 'true' && inputs.IS_FULL_RUN }} | |
- uses: aptos-labs/aptos-core/.github/actions/rust-setup@main | |
with: | |
GIT_CREDENTIALS: ${{ secrets.GIT_CREDENTIALS }} | |
if: ${{ needs.file_change_determinator.outputs.only_docs_changed != 'true' && inputs.IS_FULL_RUN }} | |
- name: Run parallel execution benchmark in performance build mode | |
shell: bash | |
run: testsuite/parallel_execution_performance.py | |
if: ${{ needs.file_change_determinator.outputs.only_docs_changed != 'true' && inputs.IS_FULL_RUN }} | |
- run: echo "Skipping parallel execution performance!" | |
if: ${{ needs.file_change_determinator.outputs.only_docs_changed == 'true' || !inputs.IS_FULL_RUN }} | |
# Run single node execution performance tests | |
single-node-performance: | |
needs: file_change_determinator | |
timeout-minutes: 60 | |
runs-on: ${{ inputs.RUNNER_NAME }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ inputs.GIT_SHA }} | |
if: needs.file_change_determinator.outputs.only_docs_changed != 'true' | |
- uses: aptos-labs/aptos-core/.github/actions/rust-setup@main | |
with: | |
GIT_CREDENTIALS: ${{ secrets.GIT_CREDENTIALS }} | |
if: needs.file_change_determinator.outputs.only_docs_changed != 'true' | |
- name: Run single node execution benchmark in performance build mode | |
shell: bash | |
run: TABULATE_INSTALL=lib-only pip install tabulate && testsuite/single_node_performance.py | |
if: ${{ needs.file_change_determinator.outputs.only_docs_changed != 'true' && !inputs.IS_FULL_RUN }} | |
- name: Run full version of the single node execution benchmark in performance build mode | |
shell: bash | |
run: TABULATE_INSTALL=lib-only pip install tabulate && FLOW=CONTINUOUS testsuite/single_node_performance.py | |
if: ${{ needs.file_change_determinator.outputs.only_docs_changed != 'true' && inputs.IS_FULL_RUN }} | |
- run: echo "Skipping single node execution performance! Unrelated changes detected." | |
if: needs.file_change_determinator.outputs.only_docs_changed == 'true' | |
single-node-performance-profile: | |
needs: file_change_determinator | |
timeout-minutes: 60 | |
runs-on: ${{ inputs.RUNNER_NAME }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ inputs.GIT_SHA }} | |
if: ${{needs.file_change_determinator.outputs.only_docs_changed != 'true' && inputs.PROFILE}} | |
- uses: aptos-labs/aptos-core/.github/actions/rust-setup@main | |
with: | |
GIT_CREDENTIALS: ${{ secrets.GIT_CREDENTIALS }} | |
if: needs.file_change_determinator.outputs.only_docs_changed != 'true' | |
- name: Run single node execution benchmark in performance build mode | |
shell: bash | |
run: TABULATE_INSTALL=lib-only pip install tabulate && testsuite/single_node_performance.py | |
if: ${{ needs.file_change_determinator.outputs.only_docs_changed != 'true' && inputs.PROFILE }} | |
- name: Run full version of the single node execution benchmark in performance build mode | |
shell: bash | |
run: TABULATE_INSTALL=lib-only pip install tabulate && FLOW=CONTINUOUS PROFILE=1 testsuite/single_node_performance.py | |
if: ${{ needs.file_change_determinator.outputs.only_docs_changed != 'true' && inputs.PROFILE }} | |
- name: Upload profile results | |
uses: actions/upload-artifact@v3 | |
with: | |
path: profiling_results | |
if: ${{ needs.file_change_determinator.outputs.only_docs_changed != 'true' && inputs.PROFILE }} | |
- run: echo "Skipping single node execution performance! Unrelated changes detected." | |
if: needs.file_change_determinator.outputs.only_docs_changed == 'true' |