78 lines
2.4 KiB
YAML
78 lines
2.4 KiB
YAML
|
name: Run test vector generation
|
||
|
|
||
|
defaults:
|
||
|
run:
|
||
|
shell: zsh {0}
|
||
|
|
||
|
on:
|
||
|
workflow_dispatch:
|
||
|
inputs:
|
||
|
ref:
|
||
|
description: The branch, tag or SHA to checkout and build from
|
||
|
default: dev
|
||
|
type: string
|
||
|
required: true
|
||
|
|
||
|
jobs:
|
||
|
generate-tests:
|
||
|
runs-on: [self-hosted-ghr-custom, size-chungus-x64, profile-consensusSpecs]
|
||
|
steps:
|
||
|
- name: Checkout repository
|
||
|
uses: actions/checkout@v4
|
||
|
with:
|
||
|
repository: 'ethereum/consensus-specs'
|
||
|
path: 'consensus-specs'
|
||
|
ref: ${{ inputs.source_ref }}
|
||
|
- name: Checkout consensus-spec-tests repository
|
||
|
uses: actions/checkout@v4
|
||
|
with:
|
||
|
repository: 'ethereum/consensus-spec-tests'
|
||
|
path: 'consensus-spec-tests'
|
||
|
fetch-depth: 1
|
||
|
- name: Setup Python
|
||
|
uses: actions/setup-python@v5
|
||
|
with:
|
||
|
python-version: '3.10'
|
||
|
cache: ''
|
||
|
- name: Clean up Spec Repository
|
||
|
run: |
|
||
|
cd consensus-specs
|
||
|
make clean
|
||
|
- name: Install dependencies and generate pyspec
|
||
|
run: |
|
||
|
cd consensus-specs
|
||
|
make install_test
|
||
|
make -B pyspec
|
||
|
- name: Generate tests
|
||
|
run: |
|
||
|
cd consensus-specs
|
||
|
make -j 16 generate_tests 2>&1 | tee ../consensustestgen.log
|
||
|
cp -r presets/ ../consensus-spec-tests/presets
|
||
|
cp -r configs/ ../consensus-spec-tests/configs
|
||
|
find . -type d -empty -delete
|
||
|
- 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@v4
|
||
|
with:
|
||
|
name: General Test Configuration
|
||
|
path: consensus-spec-tests/general.tar.gz
|
||
|
- name: Upload minimal.tar.gz
|
||
|
uses: actions/upload-artifact@v4
|
||
|
with:
|
||
|
name: Minimal Test Configuration
|
||
|
path: consensus-spec-tests/minimal.tar.gz
|
||
|
- name: Upload mainnet.tar.gz
|
||
|
uses: actions/upload-artifact@v4
|
||
|
with:
|
||
|
name: Mainnet Test Configuration
|
||
|
path: consensus-spec-tests/mainnet.tar.gz
|
||
|
- name: Upload consensustestgen
|
||
|
uses: actions/upload-artifact@v4
|
||
|
with:
|
||
|
name: consensustestgen.log
|
||
|
path: consensustestgen.log
|