Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install pip to fix test vector generators #3926

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/generate_vectors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ jobs:
run: |
cd consensus-specs
make clean
# Necessary to build/install python-snappy
- name: Install snappy development headers
run: |
sudo apt update
sudo apt install -y libsnappy-dev
- name: Install dependencies and generate pyspec
run: |
cd consensus-specs
Expand Down Expand Up @@ -77,4 +82,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: consensustestgen.log
path: consensustestgen.log
path: consensustestgen.log
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ SSZ_DIR = ./ssz
SYNC_DIR = ./sync
FORK_CHOICE_DIR = ./fork_choice

# Get absolute path to the preinstall requirements, this uses := for immediate evaluation.
REQUIREMENTS_PREINSTALLATION := $(realpath requirements_preinstallation.txt)

# To check generator matching:
#$(info $$GENERATOR_TARGETS is [${GENERATOR_TARGETS}])

Expand Down Expand Up @@ -195,6 +198,7 @@ define run_generator
cd $(GENERATOR_DIR)/$(1); \
if ! test -d venv; then python3 -m venv venv; fi; \
. venv/bin/activate; \
pip3 install -r $(REQUIREMENTS_PREINSTALLATION); \
pip3 install -r requirements.txt; \
python3 main.py -o $(CURRENT_DIR)/$(TEST_VECTOR_DIR); \
echo "generator $(1) finished"
Expand Down