forked from ethereum/execution-specs
-
Notifications
You must be signed in to change notification settings - Fork 1
238 lines (217 loc) · 9.23 KB
/
Copy pathconsume_release.yaml
File metadata and controls
238 lines (217 loc) · 9.23 KB
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
# Manually run a filled fixtures release against a pinned monad stack via
# `consume direct` + the eest-runner runloop client.
name: Consume Release (monad runloop)
on:
workflow_dispatch:
inputs:
release:
description: "Fixtures source: release spec (e.g. tests-monad@v1.1.2), a fixtures.tar.gz URL, or latest"
required: true
default: "tests-monad@latest"
harness_ref:
description: "monad-eest-rust-harness ref (branch/tag/SHA)"
required: false
default: "main"
monad_bft_repo:
description: "Override monad-bft from this owner/repo (e.g. category-labs/monad-bft); empty = keep the harness's pinned commit"
required: false
default: ""
monad_bft_ref:
description: "Ref/SHA in monad_bft_repo (default branch if empty); applies only when monad_bft_repo is set"
required: false
default: ""
monad_execution_repo:
description: "Override monad-execution from this owner/repo; empty = keep the harness's pinned commit"
required: false
default: ""
monad_execution_ref:
description: "Ref/SHA in monad_execution_repo (default branch if empty); applies only when monad_execution_repo is set"
required: false
default: ""
filter:
description: "Optional -k expression to consume a subset"
required: false
default: ""
permissions:
contents: read
jobs:
consume:
runs-on: ubuntu-24.04
timeout-minutes: 1440 # hosted runners still cap at 6h; raise the runner for a full release
steps:
- name: Validate inputs
shell: bash
env:
BFT_REPO: ${{ inputs.monad_bft_repo }}
BFT_REF: ${{ inputs.monad_bft_ref }}
EXEC_REPO: ${{ inputs.monad_execution_repo }}
EXEC_REF: ${{ inputs.monad_execution_ref }}
run: |
set -euo pipefail
fail=0
if [ -n "$BFT_REF" ] && [ -z "$BFT_REPO" ]; then
echo "::error::monad_bft_ref is set but monad_bft_repo is empty; set monad_bft_repo to override monad-bft."
fail=1
fi
if [ -n "$EXEC_REF" ] && [ -z "$EXEC_REPO" ]; then
echo "::error::monad_execution_ref is set but monad_execution_repo is empty; set monad_execution_repo to override monad-execution."
fail=1
fi
[ "$fail" -eq 0 ]
- name: Checkout consumer (execution-specs)
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Checkout monad-eest-rust-harness (build input)
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: monad-exp/monad-eest-rust-harness
ref: ${{ inputs.harness_ref }}
path: monad-eest-rust-harness
submodules: recursive
fetch-depth: 0
token: ${{ secrets.MONAD_STACK_TOKEN }}
# Optional submodule overrides. Set a *_repo to pull that submodule from
# a different fork at *_ref (default branch if ref is empty); leave it
# empty to keep the harness's pinned commit. actions/checkout handles
# auth, so no manual credential setup is needed. The monad-bft override
# recurses (so monad-execution lands at the new bft's pin); the
# monad-execution override runs after, so it is not reset.
- name: Override monad-bft
if: ${{ inputs.monad_bft_repo != '' }}
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: ${{ inputs.monad_bft_repo }}
ref: ${{ inputs.monad_bft_ref }}
path: monad-eest-rust-harness/monad-bft
submodules: recursive
fetch-depth: 0
token: ${{ secrets.MONAD_STACK_TOKEN }}
- name: Override monad-execution
if: ${{ inputs.monad_execution_repo != '' }}
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: ${{ inputs.monad_execution_repo }}
ref: ${{ inputs.monad_execution_ref }}
path: monad-eest-rust-harness/monad-bft/monad-execution
fetch-depth: 0
token: ${{ secrets.MONAD_STACK_TOKEN }}
- name: Log pinned stack
id: stack
working-directory: monad-eest-rust-harness
shell: bash
run: |
harness=$(git rev-parse HEAD)
bft=$(git -C monad-bft rev-parse HEAD)
exec=$(git -C monad-bft/monad-execution rev-parse HEAD)
echo "harness: $harness"
echo "monad-bft: $bft"
echo "monad-execution: $exec"
{
echo "harness=$harness"
echo "bft=$bft"
echo "exec=$exec"
} >> "$GITHUB_OUTPUT"
# The monad-builder image is a fixed toolchain built from a bare
# Dockerfile (no build context), and it is needed both by build.sh
# and at consume time (the bin/ wrappers run the binary inside it).
# Cache it as a tarball keyed on the Dockerfile so it rebuilds only
# when the toolchain changes.
- name: Restore monad-builder image
id: image-cache
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: /tmp/monad-builder.tar
key: monad-builder-${{ runner.os }}-${{ hashFiles('monad-eest-rust-harness/monad-bft/docker/builder/Dockerfile') }}
- name: Build or load the monad-builder image
working-directory: monad-eest-rust-harness
shell: bash
run: |
if [ -f /tmp/monad-builder.tar ]; then
docker load -i /tmp/monad-builder.tar
else
docker build -t monad-builder:latest \
- < monad-bft/docker/builder/Dockerfile
docker save -o /tmp/monad-builder.tar monad-builder:latest
fi
- name: Save monad-builder image
if: steps.image-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: /tmp/monad-builder.tar
key: ${{ steps.image-cache.outputs.cache-primary-key }}
# build.sh bind-mounts the harness root, so cargo/cmake output lands
# on the host under install/. Cache it keyed on the exact resolved
# stack (harness + monad-bft + monad-execution) plus the toolchain,
# so re-running the same stack skips the ~10 min build. Exact match
# only: an install/ from a different stack would be wrong.
- name: Restore eest-runner install/
id: install-cache
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: monad-eest-rust-harness/install
key: eest-install-${{ runner.os }}-${{ hashFiles('monad-eest-rust-harness/monad-bft/docker/builder/Dockerfile') }}-${{ steps.stack.outputs.harness }}-${{ steps.stack.outputs.bft }}-${{ steps.stack.outputs.exec }}
- name: Build the eest-runner stack (build.sh)
if: steps.install-cache.outputs.cache-hit != 'true'
working-directory: monad-eest-rust-harness
shell: bash
run: ./build.sh
- name: Save eest-runner install/
if: steps.install-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: monad-eest-rust-harness/install
key: ${{ steps.install-cache.outputs.cache-primary-key }}
- name: Setup uv
uses: ./.github/actions/setup-uv
- name: Install EEST
shell: bash
run: uv sync --no-progress
- name: Provision hugepages
shell: bash
run: sudo sysctl -w vm.nr_hugepages=3072
- name: Consume release
shell: bash
env:
RELEASE: ${{ inputs.release }}
FILTER: ${{ inputs.filter }}
run: |
set -o pipefail
FILTER_ARG=()
if [ -n "$FILTER" ]; then
FILTER_ARG=(-k "$FILTER")
fi
uv run consume direct \
--input "$RELEASE" \
--bin "$GITHUB_WORKSPACE/monad-eest-rust-harness/bin/eest-runner" \
-m runloop_test \
"${FILTER_ARG[@]}" -v | tee consume.log
- name: Summary
if: always()
shell: bash
env:
RELEASE: ${{ inputs.release }}
FILTER: ${{ inputs.filter || '(none)' }}
HARNESS_REF: ${{ inputs.harness_ref }}
BFT_SHA: ${{ steps.stack.outputs.bft }}
EXEC_SHA: ${{ steps.stack.outputs.exec }}
run: |
{
echo "## consume \`${RELEASE:-(unknown)}\`"
echo ""
echo "| input | value |"
echo "|---|---|"
echo "| harness_ref | \`${HARNESS_REF}\` |"
echo "| monad-bft | \`${BFT_SHA:-(unknown)}\` |"
echo "| monad-execution | \`${EXEC_SHA:-(unknown)}\` |"
echo "| filter | \`${FILTER:-(none)}\` |"
echo ""
echo '```'
cat consume.log 2>/dev/null || echo "(no consume.log produced)"
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
- name: Upload log
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: consume-report
path: consume.log
if-no-files-found: warn