From 47addd7be52f2e07743aa2f4710236f463c5afdf Mon Sep 17 00:00:00 2001 From: spencer Date: Thu, 8 Aug 2024 13:00:01 +0100 Subject: [PATCH] ci: include conversion tests | use matrix. (#470) * feat: tweak eest ci (matrix). * chore: remove prev ci. --- .github/workflows/spec-tests.yml | 118 ++++++++++++++++++++++++ .github/workflows/spectests-genesis.yml | 40 -------- 2 files changed, 118 insertions(+), 40 deletions(-) create mode 100644 .github/workflows/spec-tests.yml delete mode 100644 .github/workflows/spectests-genesis.yml diff --git a/.github/workflows/spec-tests.yml b/.github/workflows/spec-tests.yml new file mode 100644 index 000000000000..17e3a929b8ee --- /dev/null +++ b/.github/workflows/spec-tests.yml @@ -0,0 +1,118 @@ +name: Execution Spec Tests Fill and Consume (Verkle genesis & conversion) + +on: + push: + branches: [master] + pull_request: + branches: [master, kaustinen-with-shapella] + workflow_dispatch: + +env: + EEST_USER: 'jsign' + EEST_BRANCH: 'jsign-verkle-rebased-mainnet' + +jobs: + setup: + runs-on: ubuntu-latest + steps: + - name: Checkout go-ethereum + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.12.4" + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: 1.22.4 + + - name: Build geth evm + run: | + go build -v ./cmd/evm + mkdir -p ${{ github.workspace }}/bin + mv evm ${{ github.workspace }}/bin/evm + chmod +x ${{ github.workspace }}/bin/evm + + - name: Archive built evm + uses: actions/upload-artifact@v4 + with: + name: evm + path: ${{ github.workspace }}/bin/evm + + fill: + runs-on: ubuntu-latest + needs: setup + strategy: + matrix: + test-type: [genesis, conversion] + steps: + - name: Download geth evm + uses: actions/download-artifact@v4 + with: + name: evm + path: ./bin + + - name: Make evm binary executable and add to PATH + run: | + chmod +x ./bin/evm + echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + + - name: Clone execution-spec-tests and fill tests + run: | + git clone https://github.com/${{ env.EEST_USER }}/execution-spec-tests -b ${{ env.EEST_BRANCH }} + cd execution-spec-tests + python3 -m venv venv + . venv/bin/activate + pip install --upgrade pip + pip install -e ".[docs,lint,test]" + solc-select use 0.8.24 --always-install + if [ "${{ matrix.test-type }}" == "genesis" ]; then + fill --fork Verkle --output=../fixtures-${{ matrix.test-type }} -v -m blockchain_test -n auto + else + fill --fork EIP6800Transition --output=../fixtures-${{ matrix.test-type }} -v -m blockchain_test -n auto + fi + shell: bash + + - name: Upload fixtures + uses: actions/upload-artifact@v4 + with: + name: fixtures-${{ matrix.test-type }} + path: fixtures-${{ matrix.test-type }} + + consume: + runs-on: ubuntu-latest + needs: fill + strategy: + matrix: + test-type: [genesis, conversion] + steps: + - name: Download geth evm + uses: actions/download-artifact@v4 + with: + name: evm + path: ./bin + + - name: Make evm binary executable and add to PATH + run: | + chmod +x ./bin/evm + echo "${{ github.workspace }}/bin" >> $GITHUB_PATH + + - name: Download fixtures + uses: actions/download-artifact@v4 + with: + name: fixtures-${{ matrix.test-type }} + path: ./fixtures-${{ matrix.test-type }} + + - name: Clone execution-spec-tests and consume tests + run: | + git clone https://github.com/${{ env.EEST_USER }}/execution-spec-tests -b ${{ env.EEST_BRANCH }} + cd execution-spec-tests + python3 -m venv venv + . venv/bin/activate + pip install --upgrade pip + pip install -e ".[docs,lint,test]" + solc-select use 0.8.24 --always-install + consume direct --input=../fixtures-${{ matrix.test-type }} -n auto + shell: bash \ No newline at end of file diff --git a/.github/workflows/spectests-genesis.yml b/.github/workflows/spectests-genesis.yml deleted file mode 100644 index 350fcdcb3a74..000000000000 --- a/.github/workflows/spectests-genesis.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Execution spec tests - -on: - push: - branches: [master] - pull_request: - branches: [master, kaustinen-with-shapella] - workflow_dispatch: - -jobs: - spectests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: "3.12.4" - cache: "" - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.22.4 - - name: Fill & consume tests - run: | - export PATH=$PATH:/home/devops/.cargo/bin - go build -v ./cmd/evm - git clone https://github.com/jsign/execution-spec-tests -b jsign-verkle-rebased-mainnet - cd execution-spec-tests - python3 -m venv venv - . ./venv/bin/activate - pip install -e ".[docs,lint,test]" - solc-select install 0.8.20 - solc-select use 0.8.20 - - fill --fork EIP6800Transition -n 4 -v -m blockchain_test --evm-bin=../evm -k test_verkle_from_mpt_conversion - fill --fork Verkle -n 4 -v -m blockchain_test --evm-bin=../evm -k eip6800_genesis - fill --fork Verkle -n 4 -v -m blockchain_test --evm-bin=../evm -k eip4762 - - consume direct --evm-bin=../evm --input=fixtures/blockchain_tests/ -v -n 8