-
Notifications
You must be signed in to change notification settings - Fork 41
103 lines (95 loc) · 3.35 KB
/
aggregator-stress-test.yml
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
name: Aggregator stress test
on:
workflow_call:
workflow_dispatch:
inputs:
commit_sha:
description: SHA of the commit on which the aggregator binary should be obtained.
required: true
type: string
num_signers:
description: Number of concurrent signers
required: true
type: string
default: "100"
num_clients:
description: Number of concurrent clients
required: true
type: string
default: "100"
enable_debug:
description: Enable debug output ("-vvv") for the aggregator stress test
required: true
type: boolean
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=${{ enable_debug.num_clients }}"s >> $GITHUB_OUTPUT
fi
stress-test:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Prepare environment variables
id: prepare
shell: bash
run: |
if [[ "${{ needs.prepare.outputs.enable_debug }}" == "true" ]]; then
echo "debug_level=-vvv" >> $GITHUB_OUTPUT
fi
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Download built artifacts (Linux-x64)
uses: dawidd6/action-download-artifact@v6
with:
name: mithril-distribution-Linux-X64
path: ./bin
commit: ${{ needs.prepare.outputs.commit_sha }}
branch: ${{ needs.prepare.outputs.branch }}
workflow: ci.yml
workflow_conclusion: success
- name: Download test runners
uses: dawidd6/action-download-artifact@v6
with:
name: mithril-tooling-Linux-X64
path: ./bin
commit: ${{ inputs.commit_sha }}
workflow: ci.yml
workflow_conclusion: success
- name: Set permissions
shell: bash
working-directory: ./bin
run: |
chmod +x ./mithril-aggregator
chmod +x ./load-aggregator
- name: Run the aggregator stress test
run: |
./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=${{ needs.prepare.outputs.num_signers }} \
--num-clients=${{ needs.prepare.outputs.num_clients }}