1+ name : ' Build EVM'
2+ description : ' Resolves and builds the requested EVM binary by name'
3+ inputs :
4+ type :
5+ description : ' Type of EVM binary to build'
6+ required : true
7+ default : ' main'
8+ outputs :
9+ impl :
10+ description : " Implementation of EVM binary to build"
11+ value : ${{ steps.config-evm-reader.outputs.impl }}
12+ repo :
13+ description : " Repository to use to build the EVM binary"
14+ value : ${{ steps.config-evm-reader.outputs.repo }}
15+ ref :
16+ description : " Reference to branch, commit, or tag to use to build the EVM binary"
17+ value : ${{ steps.config-evm-reader.outputs.ref }}
18+ evm-bin :
19+ description : " Binary name of the evm tool to use"
20+ value : ${{ steps.config-evm-impl-config-reader.outputs.evm-bin }}
21+ x-dist :
22+ description : " Binary name of the evm tool to use"
23+ value : ${{ steps.config-evm-impl-config-reader.outputs.x-dist }}
24+ runs :
25+ using : " composite"
26+ steps :
27+ - name : Get the selected EVM version from the .github/configs/evm.yaml
28+ id : config-evm-reader
29+ shell : bash
30+ run : |
31+ awk "/^${{ inputs.type }}:/{flag=1; next} /^[[:alnum:]]/{flag=0} flag" ./.github/configs/evm.yaml \
32+ | 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"
39+ - name : Print Variables for the selected EVM type
40+ shell : bash
41+ run : |
42+ echo "Implementation: ${{ steps.config-evm-reader.outputs.impl }}"
43+ echo "Repository: ${{ steps.config-evm-reader.outputs.repo }}"
44+ 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 }}"
47+ - name : Skip building for EELS
48+ if : steps.config-evm-reader.outputs.impl == 'eels'
49+ shell : bash
50+ run : echo "Skipping build for EELS"
51+ - name : Build the EVM using Geth action
52+ if : steps.config-evm-reader.outputs.impl == 'geth'
53+ uses : ./.github/actions/build-evm-client/geth
54+ with :
55+ repo : ${{ steps.config-evm-reader.outputs.repo }}
56+ ref : ${{ steps.config-evm-reader.outputs.ref }}
57+ - name : Build the EVM using EVMONE action
58+ if : steps.config-evm-reader.outputs.impl == 'evmone'
59+ uses : ./.github/actions/build-evm-client/evmone
60+ with :
61+ repo : ${{ steps.config-evm-reader.outputs.repo }}
62+ 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
64+ targets : ${{ join(fromJSON(steps.config-evm-reader.outputs.targets), ' ') }}
65+ - name : Build the EVM using Besu action
66+ if : steps.config-evm-reader.outputs.impl == 'besu'
67+ uses : ./.github/actions/build-evm-client/besu
68+ with :
69+ repo : ${{ steps.config-evm-reader.outputs.repo }}
70+ 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 }}
0 commit comments