From 0de9ac68a6bed2efb0df9992e02ad9260b825544 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Raynaud Date: Thu, 19 Dec 2024 15:14:02 +0100 Subject: [PATCH 1/2] feat: prepare 'Aggregator Stress Test' workflow for nightly dispatch --- .github/workflows/aggregator-stress-test.yml | 38 +++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/.github/workflows/aggregator-stress-test.yml b/.github/workflows/aggregator-stress-test.yml index d86f39ac08b..7618a4c86a9 100644 --- a/.github/workflows/aggregator-stress-test.yml +++ b/.github/workflows/aggregator-stress-test.yml @@ -1,6 +1,7 @@ name: Aggregator stress test on: + workflow_call: workflow_dispatch: inputs: commit_sha: @@ -24,8 +25,33 @@ 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 + needs: [prepare] steps: - name: Checkout sources uses: actions/checkout@v4 @@ -34,7 +60,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 @@ -48,7 +74,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 @@ -57,7 +84,8 @@ jobs: with: name: mithril-tooling-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 @@ -73,5 +101,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 }} From 1443650afcac5f9c2a9b324acd84c9be47c24993 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Raynaud Date: Thu, 19 Dec 2024 15:14:25 +0100 Subject: [PATCH 2/2] feat: configure Aggregator Stress Test' workflow in nightly dispatcher --- .github/workflows/nightly-dispatcher.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly-dispatcher.yml b/.github/workflows/nightly-dispatcher.yml index 6376e48c83e..cf99fe573d8 100644 --- a/.github/workflows/nightly-dispatcher.yml +++ b/.github/workflows/nightly-dispatcher.yml @@ -7,15 +7,18 @@ on: - cron: "0 2 * * *" jobs: + backward-compatibility: + uses: ./.github/workflows/backward-compatibility.yml + docker-builds: uses: ./.github/workflows/docker-builds.yml - backward-compatibility: - uses: ./.github/workflows/backward-compatibility.yml + aggregator-stress-test: + uses: ./.github/workflows/aggregator-stress-test.yml notify-on-failure: runs-on: ubuntu-22.04 - needs: [docker-builds] + needs: [docker-builds, aggregator-stress-test] if: failure() steps: - name: Checkout repository