Skip to content

Run test vector generation #86

Run test vector generation

Run test vector generation #86

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
schedule:
- cron: '0 2 * * *'
jobs:
generate-tests:
runs-on: [self-hosted-ghr-custom, size-xl-x64, profile-consensusSpecs]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: 'ethereum/consensus-specs'
path: 'consensus-specs'
ref: ${{ inputs.ref || 'dev' }}
- 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.12.4'
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: Check for errors
run: |
if grep -q "\[ERROR\]" consensustestgen.log; then
echo "There is an error in the log"
exit 1
fi
if find . -type f -name "INCOMPLETE" | grep -q "INCOMPLETE"; then
echo "There is an INCOMPLETE file"
exit 1
fi
- 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