From e320cd39d6bb6ff6f83dc7299b47646a37e949a2 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Tue, 17 Sep 2024 07:48:42 -0500 Subject: [PATCH 1/2] Install preinstall-reqs for test vector generators --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 23b6a6035d..56a8758077 100644 --- a/Makefile +++ b/Makefile @@ -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}]) @@ -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" From 7d921900dbb49331bad37816a07c4d343b93f8e2 Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Tue, 17 Sep 2024 10:26:49 -0500 Subject: [PATCH 2/2] Add step to install libsnappy-dev --- .github/workflows/generate_vectors.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate_vectors.yml b/.github/workflows/generate_vectors.yml index b0af503543..46d3cac34f 100644 --- a/.github/workflows/generate_vectors.yml +++ b/.github/workflows/generate_vectors.yml @@ -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 @@ -77,4 +82,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: consensustestgen.log - path: consensustestgen.log \ No newline at end of file + path: consensustestgen.log