Skip to content

Commit

Permalink
feat: prepare 'Aggregator Stress Test' workflow for nightly dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
jpraynaud committed Dec 19, 2024
1 parent d106a3f commit 684ef20
Showing 1 changed file with 30 additions and 4 deletions.
34 changes: 30 additions & 4 deletions .github/workflows/aggregator-stress-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Aggregator stress test

on:
workflow_call:
workflow_dispatch:
inputs:
commit_sha:
Expand All @@ -24,6 +25,30 @@ on:
default: false

jobs:
prepare:
runs-on: ubuntu-22.04
outputs:
branch: ${{ steps.set-env.outputs.branch }}
commit_sha: ${{ steps.set-env.outputs.commit_sha }}
num_signers: ${{ steps.set-env.outputs.num_signers }}
num_clients: ${{ steps.set-env.outputs.num_clients }}
enable_debug: ${{ steps.set-env.outputs.enable_debug }}
steps:
- name: Prepare env variables
id: set-env
shell: bash
run: |
if [[ "${{ github.event_name }}" == "schedule" ]]; then
echo "branch=main" >> $GITHUB_OUTPUT
echo "num_signers=100" >> $GITHUB_OUTPUT
echo "num_clients=100" >> $GITHUB_OUTPUT
echo "enable_debug=false" >> $GITHUB_OUTPUT
else
echo "commit_sha=${{ inputs.commit_sha }}" >> $GITHUB_OUTPUT
echo "num_signers=${{ inputs.num_signers }}" >> $GITHUB_OUTPUT
echo "num_clients=${{ inputs.num_clients }}" >> $GITHUB_OUTPUT
echo "enable_debug=${{ inputs.enable_debug }}"s >> $GITHUB_OUTPUT
fi
stress-test:
runs-on: ubuntu-22.04
steps:
Expand All @@ -34,7 +59,7 @@ jobs:
id: prepare
shell: bash
run: |
if [[ "${{ inputs.enable_debug }}" == "true" ]]; then
if [[ "${{ needs.prepare.outputs.enable_debug }}" == "true" ]]; then
echo "debug_level=-vvv" >> $GITHUB_OUTPUT
fi
Expand All @@ -48,7 +73,8 @@ jobs:
with:
name: mithril-distribution-Linux-X64
path: ./bin
commit: ${{ inputs.commit_sha }}
commit: ${{ needs.prepare.outputs.commit_sha }}
branch: ${{ needs.prepare.outputs.branch }}
workflow: ci.yml
workflow_conclusion: success

Expand All @@ -73,5 +99,5 @@ jobs:
./bin/load-aggregator ${{ steps.prepare.outputs.debug_level }} \
--cardano-cli-path ./mithril-test-lab/mithril-end-to-end/script/mock-cardano-cli \
--aggregator-dir ./bin \
--num-signers=${{ inputs.num_signers }} \
--num-clients=${{ inputs.num_clients }}
--num-signers=${{ needs.prepare.outputs.num_signers }} \
--num-clients=${{ needs.prepare.outputs.num_clients }}

0 comments on commit 684ef20

Please sign in to comment.