Skip to content

Commit c43a97b

Browse files
committed
feat(ci): overhaul fixture releases
1 parent 62b914c commit c43a97b

9 files changed

Lines changed: 184 additions & 242 deletions

File tree

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

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ name: 'Build EVM'
22
description: 'Resolves and builds the requested EVM binary by name'
33
inputs:
44
type:
5-
description: 'Type of EVM binary to build'
5+
description: 'Type of EVM binary to build (key in .github/configs/evm.yaml)'
66
required: true
7-
default: 'main'
87
outputs:
98
impl:
109
description: "Implementation of EVM binary to build"
11-
value: ${{ steps.config-evm-reader.outputs.impl }}
10+
value: ${{ inputs.type }}
1211
repo:
1312
description: "Repository to use to build the EVM binary"
1413
value: ${{ steps.config-evm-reader.outputs.repo }}
@@ -17,60 +16,48 @@ outputs:
1716
value: ${{ steps.config-evm-reader.outputs.ref }}
1817
evm-bin:
1918
description: "Binary name of the evm tool to use"
20-
value: ${{ steps.config-evm-impl-config-reader.outputs.evm-bin }}
19+
value: ${{ steps.config-evm-reader.outputs.evm-bin }}
2120
x-dist:
22-
description: "Binary name of the evm tool to use"
23-
value: ${{ steps.config-evm-impl-config-reader.outputs.x-dist }}
21+
description: "Number of parallel pytest-xdist workers to use"
22+
value: ${{ steps.config-evm-reader.outputs.x-dist }}
2423
runs:
2524
using: "composite"
2625
steps:
27-
- name: Get the selected EVM version from the .github/configs/evm.yaml
26+
- name: Get the selected EVM configuration from .github/configs/evm.yaml
2827
id: config-evm-reader
2928
shell: bash
3029
run: |
3130
awk "/^${{ inputs.type }}:/{flag=1; next} /^[[:alnum:]]/{flag=0} flag" ./.github/configs/evm.yaml \
3231
| sed 's/ //g' | sed 's/:/=/g' >> "$GITHUB_OUTPUT"
33-
- name: Get the EVM implementation configuration from .github/configs/evm-impl-config.yaml
34-
id: config-evm-impl-config-reader
35-
shell: bash
36-
run: |
37-
awk "/^${{ steps.config-evm-reader.outputs.impl }}:/{flag=1; next} /^[[:alnum:]]/{flag=0} flag" ./.github/configs/evm-impl.yaml \
38-
| sed 's/ //g' | sed 's/:/=/g' >> "$GITHUB_OUTPUT"
3932
- name: Print Variables for the selected EVM type
4033
shell: bash
4134
run: |
42-
echo "Implementation: ${{ steps.config-evm-reader.outputs.impl }}"
35+
echo "Implementation: ${{ inputs.type }}"
4336
echo "Repository: ${{ steps.config-evm-reader.outputs.repo }}"
4437
echo "Reference: ${{ steps.config-evm-reader.outputs.ref }}"
45-
echo "EVM Binary: ${{ steps.config-evm-impl-config-reader.outputs.evm-bin }}"
46-
echo "X-Dist parameter: ${{ steps.config-evm-impl-config-reader.outputs.x-dist }}"
38+
echo "EVM Binary: ${{ steps.config-evm-reader.outputs.evm-bin }}"
39+
echo "X-Dist parameter: ${{ steps.config-evm-reader.outputs.x-dist }}"
4740
- name: Skip building for EELS
48-
if: steps.config-evm-reader.outputs.impl == 'eels'
41+
if: inputs.type == 'eels'
4942
shell: bash
5043
run: echo "Skipping build for EELS"
5144
- name: Build the EVM using Geth action
52-
if: steps.config-evm-reader.outputs.impl == 'geth'
45+
if: inputs.type == 'geth'
5346
uses: ./.github/actions/build-evm-client/geth
5447
with:
5548
repo: ${{ steps.config-evm-reader.outputs.repo }}
5649
ref: ${{ steps.config-evm-reader.outputs.ref }}
5750
- name: Build the EVM using EVMONE action
58-
if: steps.config-evm-reader.outputs.impl == 'evmone'
51+
if: inputs.type == 'evmone'
5952
uses: ./.github/actions/build-evm-client/evmone
6053
with:
6154
repo: ${{ steps.config-evm-reader.outputs.repo }}
6255
ref: ${{ steps.config-evm-reader.outputs.ref }}
63-
# `targets` in the evm.yaml must be an inline array to not interfere with `config-evm-reader`'s parsing
56+
# `targets` in evm.yaml must be an inline array to not interfere with `config-evm-reader`'s parsing
6457
targets: ${{ join(fromJSON(steps.config-evm-reader.outputs.targets), ' ') }}
6558
- name: Build the EVM using Besu action
66-
if: steps.config-evm-reader.outputs.impl == 'besu'
59+
if: inputs.type == 'besu'
6760
uses: ./.github/actions/build-evm-client/besu
6861
with:
6962
repo: ${{ steps.config-evm-reader.outputs.repo }}
7063
ref: ${{ steps.config-evm-reader.outputs.ref }}
71-
- name: Build the EVM using EthJS action
72-
if: steps.config-evm-reader.outputs.impl == 'ethjs'
73-
uses: ./.github/actions/build-evm-client/ethjs
74-
with:
75-
repo: ${{ steps.config-evm-reader.outputs.repo }}
76-
ref: ${{ steps.config-evm-reader.outputs.ref }}

.github/actions/build-evm-client/ethjs/action.yaml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/configs/evm-impl.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/configs/evm.yaml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
eels:
2-
impl: eels
32
repo: null
43
ref: null
5-
static:
6-
impl: evmone
4+
evm-bin: null
5+
x-dist: auto
6+
evmone:
77
repo: ethereum/evmone
88
ref: master
99
targets: ["evmone-t8n"]
10-
benchmark:
11-
impl: geth
10+
evm-bin: evmone-t8n
11+
x-dist: auto
12+
geth:
1213
repo: ethereum/go-ethereum
13-
ref: master
14+
ref: master
15+
evm-bin: evm
16+
x-dist: auto
17+
besu:
18+
repo: hyperledger/besu
19+
ref: main
20+
evm-bin: evmtool
21+
x-dist: 0

.github/configs/feature.yaml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
# Unless filling for special features, all features should fill for previous forks (starting from Frontier) too
2-
mainnet:
2+
consensus:
33
evm-type: eels
4-
fill-params: --until=BPO2 --generate-all-formats
4+
fill-params: --until=BPO4
55

66
benchmark:
7-
evm-type: benchmark
8-
fill-params: --fork=Osaka --generate-all-formats --gas-benchmark-values 1,5,10,30,60,100,150 ./tests/benchmark/compute --maxprocesses=30 --dist=worksteal
9-
feature_only: true
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
109

11-
benchmark_fast:
12-
evm-type: benchmark
13-
fill-params: --fork=Osaka --generate-all-formats --gas-benchmark-values 100 ./tests/benchmark/compute
14-
feature_only: true
15-
16-
bal:
10+
devnet:
1711
evm-type: eels
18-
fill-params: --fork=Amsterdam
19-
feature_only: true
12+
fill-params: --until=Amsterdam

.github/scripts/generate_build_matrix.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,22 @@ def main() -> None:
142142
fork_ranges = load_config(FORK_RANGES_CONFIG) or []
143143
name = sys.argv[1]
144144

145-
if name not in config or not isinstance(config[name], dict):
145+
# `<feat>-devnet` releases (e.g. bal-devnet) share the `devnet` entry,
146+
# while keeping their friendly name in the matrix and artifact outputs.
147+
lookup = (
148+
"devnet"
149+
if name.endswith("-devnet") and "devnet" in config
150+
else name
151+
)
152+
153+
if lookup not in config or not isinstance(config[lookup], dict):
146154
print(
147-
f"Error: feature '{name}' not found in {FEATURE_CONFIG}.",
155+
f"Error: feature '{lookup}' not found in {FEATURE_CONFIG}.",
148156
file=sys.stderr,
149157
)
150158
sys.exit(1)
151159

152-
build, labels = build_matrix(config[name], name, fork_ranges)
160+
build, labels = build_matrix(config[lookup], name, fork_ranges)
153161

154162
print(f"build_matrix={json.dumps(build)}")
155163
print(f"feature_name={name}")

.github/scripts/get_release_props.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,14 @@ def get_release_props(release: str) -> None:
2222
with open(RELEASE_PROPS_FILE) as f:
2323
data = yaml.safe_load(f)
2424
if release not in data:
25-
print(f"Error: Release {release} not found in {RELEASE_PROPS_FILE}.")
26-
sys.exit(1)
25+
# `<feat>-devnet` releases (e.g. bal-devnet) share the `devnet` entry.
26+
if release.endswith("-devnet") and "devnet" in data:
27+
release = "devnet"
28+
else:
29+
print(
30+
f"Error: Release {release} not found in {RELEASE_PROPS_FILE}."
31+
)
32+
sys.exit(1)
2733
print("\n".join(f"{key}={value}" for key, value in data[release].items()))
2834

2935

0 commit comments

Comments
 (0)