-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(github): standardize fixture building
- Loading branch information
Showing
6 changed files
with
106 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Build and Package Fixtures | ||
inputs: | ||
name: | ||
description: 'Name of the fixture package' | ||
required: true | ||
evm-type: | ||
description: 'Type of evm tool to use to build the fixtures' | ||
required: true | ||
fill-params: | ||
description: 'Parameters to pass to the fill command' | ||
required: true | ||
python: | ||
description: 'Python version to use' | ||
required: true | ||
solc: | ||
description: 'solc compiler version to use' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: ./.github/actions/build-evm | ||
id: evm-builder | ||
with: | ||
type: ${{ inputs.evm-type }} | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ inputs.python }} | ||
- name: Install solc compiler | ||
shell: bash | ||
run: | | ||
if [ "$RUNNER_OS" == "Linux" ]; then PLATFORM="linux-amd64"; else PLATFORM="macosx-amd64"; fi | ||
RELEASE_NAME=$(curl https://binaries.soliditylang.org/${PLATFORM}/list.json | jq -r --arg SOLC_VERSION "${{ inputs.solc }}" '.releases[$SOLC_VERSION]') | ||
wget -O $GITHUB_WORKSPACE/bin/solc https://binaries.soliditylang.org/${PLATFORM}/$RELEASE_NAME | ||
chmod a+x $GITHUB_WORKSPACE/bin/solc | ||
echo $GITHUB_WORKSPACE/bin >> $GITHUB_PATH | ||
- name: Run fixtures fill | ||
shell: bash | ||
run: | | ||
pip install --upgrade pip | ||
python -m venv env | ||
source env/bin/activate | ||
pip install -e . | ||
fill -n auto --evm-bin=${{ steps.evm-builder.outputs.evm-bin }} ${{ inputs.fill-params }} | ||
- name: Create fixtures info file | ||
shell: bash | ||
run: | | ||
echo -e "ref: $GITHUB_REF \ncommit: $GITHUB_SHA\nbuild: $(date +"%Y-%m-%dT%H:%M:%SZ")" \ | ||
> fixtures/info.txt | ||
- name: Tar fixtures output | ||
shell: bash | ||
run: | | ||
tar -czvf fixtures_${{ inputs.name }}.tar.gz ./fixtures | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: fixtures_${{ inputs.name }} | ||
path: fixtures_${{ inputs.name }}.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
main: | ||
stable: | ||
impl: geth | ||
repo: ethereum/go-ethereum | ||
ref: master | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
stable: | ||
evm-type: stable | ||
fill-params: '' | ||
python: 3.11 | ||
solc: 0.8.21 | ||
develop: | ||
evm-type: develop | ||
fill-params: --until=Prague | ||
python: 3.11 | ||
solc: 0.8.21 | ||
eip7692: | ||
evm-type: eip7692 | ||
fork: CancunEIP7692 | ||
tests: ./tests/prague | ||
solc: 0.8.21 | ||
python: 3.11 | ||
fill-params: --fork=CancunEIP7692 ./tests/prague | ||
python: 3.11 | ||
solc: 0.8.21 |