1- name : Nightly Bench 10 TPS
1+ name : Nightly Bench Inclusion Sweep
2+
3+ # Inclusion sweep: deploys ONE network and runs the
4+ # 1/5/10 TPS points SEQUENTIALLY against it, all tagged with a shared sweepId so
5+ # the dashboard groups them. The scraper drains the mempool to zero between
6+ # points. Each point is the reusable bench-inclusion-point.yml workflow
7+ # (SKIP_NETWORK_DEPLOY=1); the next point's call `needs` the previous one so they
8+ # don't overlap. Deploy / wait-for-first-block / teardown happen once.
29
310on :
411 schedule :
5- - cron : " 30 6 * * *"
12+ - cron : " 30 3 * * *"
613 workflow_dispatch :
714 inputs :
815 docker_image :
1926 type : string
2027
2128concurrency :
22- group : nightly-bench-10tps -${{ github.ref }}
29+ group : nightly-bench-inclusion-sweep -${{ github.ref }}
2330 cancel-in-progress : true
2431
2532jobs :
2936 docker_image : ${{ steps.docker-image.outputs.docker_image }}
3037 image_label : ${{ steps.docker-image.outputs.image_label }}
3138 source_ref : ${{ steps.docker-image.outputs.source_ref }}
39+ sweep_id : ${{ steps.sweep.outputs.sweep_id }}
3240 steps :
3341 - name : Checkout
3442 uses : actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
@@ -71,130 +79,132 @@ jobs:
7179 echo "Using source ref: $source_ref"
7280
7381 - name : Verify source git ref
74- id : verify-source
7582 run : |
7683 set -euo pipefail
7784 source_ref="${{ steps.docker-image.outputs.source_ref }}"
7885 git fetch --depth 1 origin "refs/tags/${source_ref}:refs/tags/${source_ref}"
79- source_sha=$(git rev-parse "${source_ref}^{}")
80- echo "Nightly source commit: $source_sha"
86+ git rev-parse "${source_ref}^{}"
8187
8288 - name : Check if Docker image exists
8389 run : |
8490 DOCKER_IMAGE="${{ steps.docker-image.outputs.docker_image }}"
85- echo "Checking if Docker image exists: $DOCKER_IMAGE"
8691 if docker manifest inspect "$DOCKER_IMAGE" > /dev/null 2>&1; then
8792 echo "Docker image exists: $DOCKER_IMAGE"
8893 else
8994 echo "Docker image does not exist: $DOCKER_IMAGE"
9095 exit 1
9196 fi
9297
93- deploy-bench-10tps-network :
98+ - name : Compute shared sweep id
99+ id : sweep
100+ run : |
101+ # Shared across all three points so the dashboard groups the sweep.
102+ echo "sweep_id=incl-$(date -u +%Y%m%d)-${{ github.run_id }}" >> "$GITHUB_OUTPUT"
103+
104+ # ---- Deploy the single network the whole sweep runs against ----
105+ deploy :
94106 needs : select-image
95107 uses : ./.github/workflows/deploy-network.yml
96108 with :
97- network : bench-10tps
98- namespace : bench-10tps
109+ network : bench-inclusion-sweep
110+ namespace : bench-inclusion-sweep
99111 aztec_docker_image : ${{ needs.select-image.outputs.docker_image }}
100112 ref : ${{ needs.select-image.outputs.source_ref }}
101113 notify_on_failure : false
102114 secrets : inherit
103115
104- wait-for-first-l2-block :
105- needs :
106- - select-image
107- - deploy-bench-10tps-network
116+ wait :
117+ needs : [select-image, deploy]
108118 runs-on : ubuntu-latest
109119 timeout-minutes : 120
110120 steps :
111- - name : Checkout
112- uses : actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
121+ - uses : actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
113122 with :
114123 ref : ${{ needs.select-image.outputs.source_ref }}
115-
116- - name : Authenticate to Google Cloud
117- uses : google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
124+ - uses : google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
118125 with :
119126 credentials_json : ${{ secrets.GCP_SA_KEY }}
120-
121- - name : Set up Cloud SDK
122- uses : google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1
127+ - uses : google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1
123128 with :
124129 install_components : gke-gcloud-auth-plugin
125-
126130 - name : Wait for first L2 block
127131 env :
128132 GCP_PROJECT_ID : ${{ secrets.GCP_PROJECT_ID }}
129- run : |
130- cd spartan
131- ./bootstrap.sh wait_for_l2_block bench-10tps
133+ NAMESPACE : bench-inclusion-sweep
134+ run : cd spartan && ./bootstrap.sh wait_for_l2_block bench-inclusion-sweep
132135
133- benchmark :
134- needs :
135- - select-image
136- - wait-for-first-l2-block
136+ # ---- Three points, sequential, on the SAME network ----
137+ point-1tps :
138+ needs : [select-image, wait]
139+ uses : ./.github/workflows/bench-inclusion-point.yml
140+ with :
141+ tps : " 1"
142+ namespace : bench-inclusion-sweep
143+ docker_image : ${{ needs.select-image.outputs.docker_image }}
144+ source_ref : ${{ needs.select-image.outputs.source_ref }}
145+ sweep_id : ${{ needs.select-image.outputs.sweep_id }}
146+ secrets : inherit
147+
148+ # 5 TPS runs after 1 TPS finishes — gated on the network being up (wait), not
149+ # on the 1 TPS result, so a failed point drops only itself.
150+ point-5tps :
151+ needs : [select-image, wait, point-1tps]
152+ if : ${{ !cancelled() && needs.wait.result == 'success' }}
153+ uses : ./.github/workflows/bench-inclusion-point.yml
154+ with :
155+ tps : " 5"
156+ namespace : bench-inclusion-sweep
157+ docker_image : ${{ needs.select-image.outputs.docker_image }}
158+ source_ref : ${{ needs.select-image.outputs.source_ref }}
159+ sweep_id : ${{ needs.select-image.outputs.sweep_id }}
160+ secrets : inherit
161+
162+ point-10tps :
163+ needs : [select-image, wait, point-5tps]
164+ if : ${{ !cancelled() && needs.wait.result == 'success' }}
165+ uses : ./.github/workflows/bench-inclusion-point.yml
166+ with :
167+ tps : " 10"
168+ namespace : bench-inclusion-sweep
169+ docker_image : ${{ needs.select-image.outputs.docker_image }}
170+ source_ref : ${{ needs.select-image.outputs.source_ref }}
171+ sweep_id : ${{ needs.select-image.outputs.sweep_id }}
172+ secrets : inherit
173+
174+ # ---- Tear the network down once, regardless of point outcomes ----
175+ cleanup :
176+ if : always()
177+ needs : [select-image, deploy, wait, point-1tps, point-5tps, point-10tps]
137178 runs-on : ubuntu-latest
138179 steps :
139- - name : Checkout
140- uses : actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
180+ - uses : actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
141181 with :
142182 ref : ${{ needs.select-image.outputs.source_ref }}
143-
144- - name : Run 10 TPS benchmark
145- timeout-minutes : 240
183+ - name : Cleanup network resources
146184 env :
147185 AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
148186 AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
149187 GITHUB_TOKEN : ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
150188 BUILD_INSTANCE_SSH_KEY : ${{ secrets.BUILD_INSTANCE_SSH_KEY }}
151189 GCP_SA_KEY : ${{ secrets.GCP_SA_KEY }}
152190 GCP_PROJECT_ID : ${{ secrets.GCP_PROJECT_ID }}
153- SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
154- RUN_ID : ${{ github.run_id }}
155- AWS_SHUTDOWN_TIME : 240
156191 NO_SPOT : 1
157- SKIP_NETWORK_DEPLOY : " 1"
158- run : |
159- ./.github/ci3.sh network-bench-10tps bench-10tps bench-10tps "${{ needs.select-image.outputs.docker_image }}"
160-
161- cleanup :
162- if : always()
163- needs :
164- - select-image
165- - deploy-bench-10tps-network
166- - wait-for-first-l2-block
167- - benchmark
168- runs-on : ubuntu-latest
169- steps :
170- - name : Checkout
171- uses : actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
172- with :
173- ref : ${{ needs.select-image.outputs.source_ref }}
174-
175- - name : Cleanup network resources
176- uses : ./.github/actions/network-teardown
177- with :
178- env_file : bench-10tps
179- namespace : bench-10tps
180- gcp_sa_key : ${{ secrets.GCP_SA_KEY }}
181- gcp_project_id : ${{ secrets.GCP_PROJECT_ID }}
192+ run : ./.github/ci3.sh network-teardown bench-inclusion-sweep bench-inclusion-sweep
182193
183194 notify-failure :
184195 if : ${{ always() && failure() && github.event_name != 'workflow_dispatch' }}
185196 needs :
186197 - select-image
187- - deploy-bench-10tps-network
188- - wait-for-first-l2-block
189- - benchmark
190- - cleanup
198+ - deploy
199+ - wait
200+ - point-1tps
201+ - point-5tps
202+ - point-10tps
191203 runs-on : ubuntu-latest
192204 steps :
193- - name : Checkout
194- uses : actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
205+ - uses : actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
195206 with :
196207 ref : ${{ needs.select-image.outputs.source_ref }}
197-
198208 - name : Notify Slack on failure
199209 env :
200210 SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
@@ -203,6 +213,6 @@ jobs:
203213 IMAGE="${{ needs.select-image.outputs.image_label || 'unknown' }}"
204214 RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
205215 ./ci3/slack_notify_with_claudebox_kickoff "#alerts-next-scenario" \
206- "Nightly 10 TPS benchmark FAILED (image ${IMAGE}): <${RUN_URL}|View Run> (🤖)" \
207- "Nightly 10 TPS benchmark failed (image ${IMAGE}). CI run: ${RUN_URL}. Investigate the benchmark failure and identify the root cause ." \
216+ "Nightly inclusion sweep FAILED (image ${IMAGE}): <${RUN_URL}|View Run> (🤖)" \
217+ "Nightly inclusion sweep failed (image ${IMAGE}). CI run: ${RUN_URL}. Deploy/wait failures fail the whole sweep; a failed individual point drops only that point ." \
208218 --link "$RUN_URL"
0 commit comments