@@ -2,13 +2,12 @@ name: 'Build EVM'
22description : ' Resolves and builds the requested EVM binary by name'
33inputs :
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'
87outputs :
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 }}
2423runs :
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 }}
0 commit comments