Generate reference tests #302
This file contains hidden or 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
| name: Generate reference tests | |
| defaults: | |
| run: | |
| shell: zsh -e {0} | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| repo: | |
| description: The repository to use (e.g. user/consensus-specs) | |
| default: ethereum/consensus-specs | |
| type: string | |
| required: true | |
| ref: | |
| description: The branch, tag or SHA to checkout and build from | |
| default: master | |
| type: string | |
| required: true | |
| schedule: | |
| - cron: "0 2 * * *" | |
| jobs: | |
| generate-tests: | |
| timeout-minutes: 720 # 12 hours | |
| runs-on: [self-hosted-ghr-custom, size-xl-x64, profile-consensusSpecs] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| repository: ${{ inputs.repo }} | |
| path: "consensus-specs" | |
| ref: ${{ inputs.ref }} | |
| - name: Set up Python | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | |
| with: | |
| python-version-file: "consensus-specs/pyproject.toml" | |
| - name: Install uv ${{ vars.UV_VERSION }} | |
| uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7.1.0 | |
| with: | |
| enable-cache: true | |
| version: ${{ vars.UV_VERSION }} | |
| - name: Generate tests | |
| run: | | |
| cd consensus-specs | |
| set -o pipefail | |
| make reftests verbose=true 2>&1 | tee ../consensustestgen.log | |
| cp -r presets/ ../consensus-spec-tests/presets | |
| cp -r configs/ ../consensus-spec-tests/configs | |
| - name: Archive configurations | |
| run: | | |
| cd consensus-spec-tests | |
| tar -czvf general.tar.gz tests/general | |
| tar -czvf minimal.tar.gz tests/minimal | |
| tar -czvf mainnet.tar.gz tests/mainnet | |
| - name: Upload general.tar.gz | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: General Test Configuration | |
| path: consensus-spec-tests/general.tar.gz | |
| - name: Upload minimal.tar.gz | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: Minimal Test Configuration | |
| path: consensus-spec-tests/minimal.tar.gz | |
| - name: Upload mainnet.tar.gz | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: Mainnet Test Configuration | |
| path: consensus-spec-tests/mainnet.tar.gz | |
| - name: Upload consensustestgen | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: consensustestgen.log | |
| path: consensustestgen.log |