Skip to content

Commit d558bc7

Browse files
committed
chore(ci): extra clean up
1 parent 8bd6b77 commit d558bc7

12 files changed

Lines changed: 161 additions & 96 deletions

File tree

.github/actions/build-evm-base/action.yaml

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,24 @@ inputs:
44
type:
55
description: 'Type of EVM binary to build (key in .github/configs/evm.yaml)'
66
required: true
7+
repo_override:
8+
description: 'Override the repo from evm.yaml (e.g. ethereum/go-ethereum)'
9+
required: false
10+
default: ''
11+
ref_override:
12+
description: 'Override the ref/branch/commit from evm.yaml'
13+
required: false
14+
default: ''
715
outputs:
816
impl:
917
description: "Implementation of EVM binary to build"
10-
value: ${{ inputs.type }}
18+
value: ${{ steps.config-evm-reader.outputs.impl }}
1119
repo:
1220
description: "Repository to use to build the EVM binary"
13-
value: ${{ steps.config-evm-reader.outputs.repo }}
21+
value: ${{ steps.resolved.outputs.repo }}
1422
ref:
1523
description: "Reference to branch, commit, or tag to use to build the EVM binary"
16-
value: ${{ steps.config-evm-reader.outputs.ref }}
24+
value: ${{ steps.resolved.outputs.ref }}
1725
evm-bin:
1826
description: "Binary name of the evm tool to use"
1927
value: ${{ steps.config-evm-reader.outputs.evm-bin }}
@@ -29,35 +37,47 @@ runs:
2937
run: |
3038
awk "/^${{ inputs.type }}:/{flag=1; next} /^[[:alnum:]]/{flag=0} flag" ./.github/configs/evm.yaml \
3139
| sed 's/ //g' | sed 's/:/=/g' >> "$GITHUB_OUTPUT"
40+
- name: Apply repo/ref overrides
41+
id: resolved
42+
shell: bash
43+
env:
44+
DEFAULT_REPO: ${{ steps.config-evm-reader.outputs.repo }}
45+
DEFAULT_REF: ${{ steps.config-evm-reader.outputs.ref }}
46+
REPO_OVERRIDE: ${{ inputs.repo_override }}
47+
REF_OVERRIDE: ${{ inputs.ref_override }}
48+
run: |
49+
echo "repo=${REPO_OVERRIDE:-$DEFAULT_REPO}" >> "$GITHUB_OUTPUT"
50+
echo "ref=${REF_OVERRIDE:-$DEFAULT_REF}" >> "$GITHUB_OUTPUT"
3251
- name: Print Variables for the selected EVM type
3352
shell: bash
3453
run: |
35-
echo "Implementation: ${{ inputs.type }}"
36-
echo "Repository: ${{ steps.config-evm-reader.outputs.repo }}"
37-
echo "Reference: ${{ steps.config-evm-reader.outputs.ref }}"
54+
echo "Type: ${{ inputs.type }}"
55+
echo "Implementation: ${{ steps.config-evm-reader.outputs.impl }}"
56+
echo "Repository: ${{ steps.resolved.outputs.repo }}"
57+
echo "Reference: ${{ steps.resolved.outputs.ref }}"
3858
echo "EVM Binary: ${{ steps.config-evm-reader.outputs.evm-bin }}"
3959
echo "X-Dist parameter: ${{ steps.config-evm-reader.outputs.x-dist }}"
4060
- name: Skip building for EELS
41-
if: inputs.type == 'eels'
61+
if: steps.config-evm-reader.outputs.impl == 'eels'
4262
shell: bash
4363
run: echo "Skipping build for EELS"
4464
- name: Build the EVM using Geth action
45-
if: inputs.type == 'geth'
65+
if: steps.config-evm-reader.outputs.impl == 'geth'
4666
uses: ./.github/actions/build-evm-client/geth
4767
with:
48-
repo: ${{ steps.config-evm-reader.outputs.repo }}
49-
ref: ${{ steps.config-evm-reader.outputs.ref }}
68+
repo: ${{ steps.resolved.outputs.repo }}
69+
ref: ${{ steps.resolved.outputs.ref }}
5070
- name: Build the EVM using EVMONE action
51-
if: inputs.type == 'evmone'
71+
if: steps.config-evm-reader.outputs.impl == 'evmone'
5272
uses: ./.github/actions/build-evm-client/evmone
5373
with:
54-
repo: ${{ steps.config-evm-reader.outputs.repo }}
55-
ref: ${{ steps.config-evm-reader.outputs.ref }}
74+
repo: ${{ steps.resolved.outputs.repo }}
75+
ref: ${{ steps.resolved.outputs.ref }}
5676
# `targets` in evm.yaml must be an inline array to not interfere with `config-evm-reader`'s parsing
5777
targets: ${{ join(fromJSON(steps.config-evm-reader.outputs.targets), ' ') }}
5878
- name: Build the EVM using Besu action
59-
if: inputs.type == 'besu'
79+
if: steps.config-evm-reader.outputs.impl == 'besu'
6080
uses: ./.github/actions/build-evm-client/besu
6181
with:
62-
repo: ${{ steps.config-evm-reader.outputs.repo }}
63-
ref: ${{ steps.config-evm-reader.outputs.ref }}
82+
repo: ${{ steps.resolved.outputs.repo }}
83+
ref: ${{ steps.resolved.outputs.ref }}

.github/actions/build-fixtures/action.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ inputs:
1313
split_label:
1414
description: "Label for this fork-range split. Empty for unsplit builds."
1515
default: ""
16+
evm:
17+
description: "Override the evm impl. Defaults to the feature's evm-type."
18+
default: ""
19+
evm_repo:
20+
description: "Override the t8n tool repo (e.g. ethereum/go-ethereum)"
21+
default: ""
22+
evm_ref:
23+
description: "Override the t8n tool branch / tag / commit"
24+
default: ""
1625
runs:
1726
using: "composite"
1827
steps:
@@ -32,7 +41,9 @@ runs:
3241
- uses: ./.github/actions/build-evm-base
3342
id: evm-builder
3443
with:
35-
type: ${{ steps.properties.outputs.evm-type }}
44+
type: ${{ inputs.evm != '' && inputs.evm || steps.properties.outputs.evm-type }}
45+
repo_override: ${{ inputs.evm_repo }}
46+
ref_override: ${{ inputs.evm_ref }}
3647
- name: Install pigz for parallel tarball compression
3748
if: inputs.split_label == ''
3849
shell: bash

.github/configs/evm.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,38 @@
1+
# Client aliases
2+
benchmark:
3+
impl: geth
4+
repo: ethereum/go-ethereum
5+
ref: master
6+
evm-bin: evm
7+
x-dist: auto
8+
consensus:
9+
impl: eels
10+
repo: null
11+
ref: null
12+
evm-bin: null
13+
x-dist: auto
14+
115
eels:
16+
impl: eels
217
repo: null
318
ref: null
419
evm-bin: null
520
x-dist: auto
621
evmone:
22+
impl: evmone
723
repo: ethereum/evmone
824
ref: master
925
targets: ["evmone-t8n"]
1026
evm-bin: evmone-t8n
1127
x-dist: auto
1228
geth:
29+
impl: geth
1330
repo: ethereum/go-ethereum
1431
ref: master
1532
evm-bin: evm
1633
x-dist: auto
1734
besu:
35+
impl: besu
1836
repo: hyperledger/besu
1937
ref: main
2038
evm-bin: evmtool

.github/configs/feature.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Unless filling for special features, all features should fill for previous forks (starting from Frontier) too
22
consensus:
3-
evm-type: eels
3+
evm-type: consensus
44
fill-params: --until=BPO4
55

66
benchmark:
7-
evm-type: evmone
8-
fill-params: --fork=Amsterdam --gas-benchmark-values 1,10,30,60,100,150 -m "benchmark and not state_test" ./tests/benchmark
7+
evm-type: benchmark
8+
fill-params: --fork=Amsterdam --gas-benchmark-values 1,10,30,60,100,150 ./tests/benchmark
99

1010
devnet:
1111
evm-type: eels

.github/configs/fork-ranges.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
until: Prague
1313
- label: osaka
1414
from: Osaka
15-
until: Osaka
16-
- label: bpo
17-
from: BPO1
18-
until: BPO2
15+
until: BPO5
1916
- label: amsterdam
2017
from: Amsterdam
2118
until: Amsterdam

.github/scripts/generate_build_matrix.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@
4949
"Osaka",
5050
"BPO1",
5151
"BPO2",
52+
"BPO3",
53+
"BPO4",
54+
"BPO5",
5255
"Amsterdam",
5356
]
5457

@@ -145,9 +148,7 @@ def main() -> None:
145148
# `<feat>-devnet` releases (e.g. bal-devnet) share the `devnet` entry,
146149
# while keeping their friendly name in the matrix and artifact outputs.
147150
lookup = (
148-
"devnet"
149-
if name.endswith("-devnet") and "devnet" in config
150-
else name
151+
"devnet" if name.endswith("-devnet") and "devnet" in config else name
151152
)
152153

153154
if lookup not in config or not isinstance(config[lookup], dict):

.github/scripts/tests/test_release_scripts.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ class TestGenerateBuildMatrix:
4343

4444
def test_split_feature_produces_entries_per_range(self):
4545
"""Verify a split feature expands into one entry per range."""
46-
result = run_script(BUILD_MATRIX_SCRIPT, "mainnet")
46+
result = run_script(BUILD_MATRIX_SCRIPT, "consensus")
4747
assert result.returncode == 0
4848
out = parse_matrix_output(result.stdout)
4949
matrix = json.loads(out["build_matrix"])
5050
assert len(matrix) > 1
51-
assert out["feature_name"] == "mainnet"
51+
assert out["feature_name"] == "consensus"
5252
assert out["combine_labels"] != ""
5353
labels = [e["label"] for e in matrix]
5454
assert all(lbl != "" for lbl in labels)
@@ -68,15 +68,15 @@ def test_unsplit_feature_produces_single_entry(self):
6868
assert matrix[0]["from_fork"] == ""
6969
assert matrix[0]["until_fork"] == ""
7070

71-
def test_feature_only_can_be_requested_explicitly(self):
72-
"""Verify feature_only entries work when named directly."""
73-
result = run_script(BUILD_MATRIX_SCRIPT, "bal")
71+
def test_devnet_name_resolves_to_shared_feature(self):
72+
"""Verify a <feat>-devnet name resolves to the devnet feature."""
73+
result = run_script(BUILD_MATRIX_SCRIPT, "bal-devnet")
7474
assert result.returncode == 0
7575
out = parse_matrix_output(result.stdout)
7676
matrix = json.loads(out["build_matrix"])
77-
assert len(matrix) == 1
78-
assert matrix[0]["feature"] == "bal"
79-
assert out["combine_labels"] == ""
77+
assert out["feature_name"] == "bal-devnet"
78+
# Entries keep the friendly name, not the shared "devnet" key.
79+
assert all(e["feature"] == "bal-devnet" for e in matrix)
8080

8181
def test_unknown_feature_fails(self):
8282
"""Verify error exit for unknown feature name."""
@@ -92,7 +92,7 @@ def test_no_args_fails(self):
9292

9393
def test_output_is_valid_github_actions_format(self):
9494
"""Verify output lines are key=value for GITHUB_OUTPUT."""
95-
result = run_script(BUILD_MATRIX_SCRIPT, "mainnet")
95+
result = run_script(BUILD_MATRIX_SCRIPT, "consensus")
9696
assert result.returncode == 0
9797
lines = result.stdout.strip().splitlines()
9898
assert len(lines) == 3

.github/workflows/benchmark.yaml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,3 @@ jobs:
8383

8484
# TODO: Add execute remote tests with --gas-benchmark-values
8585
# TODO: Add execute remote tests with --fixed-opcode-count
86-
87-
build-artifact:
88-
name: Build Benchmark Fixture Artifact
89-
needs: [sanity-checks] # TODO: Add execute remote jobs when implemented
90-
if: github.event_name == 'push'
91-
runs-on: [self-hosted-ghr, size-gigachungus-x64]
92-
timeout-minutes: 720
93-
steps:
94-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
95-
with:
96-
submodules: true
97-
98-
- uses: ./.github/actions/build-fixtures
99-
with:
100-
release_name: benchmark_fast

.github/workflows/release_fixtures.yaml

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,29 @@ on:
44
workflow_dispatch:
55
inputs:
66
feature:
7-
description: "Feature release, e.g. consensus@v1.2.3 or bal-devnet@v1.0.0 (tests- prefix optional)"
7+
description: "Feature name, e.g. consensus, benchmark, bal-devnet"
8+
required: true
9+
type: string
10+
version:
11+
description: "Release version, e.g. v20.0.0"
812
required: true
913
type: string
1014
branch:
1115
description: "Branch to release from (required for *-devnet features)"
1216
required: false
1317
type: string
18+
evm:
19+
description: "Override the evm impl (e.g. geth, evmone). Defaults to the feature's evm-type."
20+
required: false
21+
type: string
22+
evm_repo:
23+
description: "Override the t8n tool repo (e.g. ethereum/go-ethereum)"
24+
required: false
25+
type: string
26+
evm_ref:
27+
description: "Override the t8n tool branch / tag / commit"
28+
required: false
29+
type: string
1430

1531
jobs:
1632
setup:
@@ -31,16 +47,31 @@ jobs:
3147
shell: bash
3248
env:
3349
INPUT_FEATURE: ${{ inputs.feature }}
50+
INPUT_VERSION: ${{ inputs.version }}
3451
INPUT_BRANCH: ${{ inputs.branch }}
52+
INPUT_EVM: ${{ inputs.evm }}
3553
run: |
36-
RELEASE_NAME="${INPUT_FEATURE#tests-}"
37-
FEATURE_NAME="${RELEASE_NAME%%@*}"
54+
FEATURE_NAME="$INPUT_FEATURE"
55+
VERSION="$INPUT_VERSION"
56+
57+
if [ -z "$FEATURE_NAME" ]; then
58+
echo "::error::feature name is empty"
59+
exit 1
60+
fi
61+
if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
62+
echo "::error::version '$VERSION' must match vX.Y.Z (e.g. v20.0.0)"
63+
exit 1
64+
fi
65+
if [ -n "$INPUT_EVM" ] && ! grep -qE "^${INPUT_EVM}:" .github/configs/evm.yaml; then
66+
echo "::error::evm '$INPUT_EVM' is not a key in .github/configs/evm.yaml"
67+
exit 1
68+
fi
3869
3970
# `<feat>-devnet` releases (e.g. bal-devnet) resolve to the shared
4071
# `devnet` feature but keep their friendly name, and must specify
4172
# the branch to release from.
4273
if [ "$FEATURE_NAME" = "devnet" ] || [ "$FEATURE_NAME" = "-devnet" ]; then
43-
echo "::error::devnet releases require a <feat>- prefix, e.g. bal-devnet@v1.0.0"
74+
echo "::error::devnet releases require a <feat>- prefix, e.g. bal-devnet"
4475
exit 1
4576
fi
4677
if [[ "$FEATURE_NAME" == *-devnet && -z "$INPUT_BRANCH" ]]; then
@@ -71,6 +102,9 @@ jobs:
71102
from_fork: ${{ matrix.from_fork }}
72103
until_fork: ${{ matrix.until_fork }}
73104
split_label: ${{ matrix.label }}
105+
evm: ${{ inputs.evm }}
106+
evm_repo: ${{ inputs.evm_repo }}
107+
evm_ref: ${{ inputs.evm_ref }}
74108

75109
combine:
76110
name: combine (${{ needs.setup.outputs.feature_name }})
@@ -152,18 +186,18 @@ jobs:
152186
shell: bash
153187
env:
154188
INPUT_FEATURE: ${{ inputs.feature }}
189+
INPUT_VERSION: ${{ inputs.version }}
155190
INPUT_BRANCH: ${{ inputs.branch }}
156191
FEATURE_NAME: ${{ needs.setup.outputs.feature_name }}
157192
GH_TOKEN: ${{ github.token }}
158193
run: |
159194
# Release title has no "tests-" prefix; the git tag always does.
160-
RELEASE_NAME="${INPUT_FEATURE#tests-}"
195+
RELEASE_NAME="${INPUT_FEATURE}@${INPUT_VERSION}"
161196
TAG_NAME="tests-${RELEASE_NAME}"
162-
FEATURE_PREFIX="${RELEASE_NAME%%@*}"
163197
164198
# Use the prior release of the same feature as the notes baseline.
165199
PREV_TAG=$(
166-
git tag --list "tests-${FEATURE_PREFIX}@v*" --sort=-v:refname \
200+
git tag --list "tests-${INPUT_FEATURE}@v*" --sort=-v:refname \
167201
| grep -v "^${TAG_NAME}$" \
168202
| head -n 1 \
169203
|| true

0 commit comments

Comments
 (0)