mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 12:47:05 +00:00
Use makefile rather than script
This commit is contained in:
@@ -10,9 +10,15 @@ BLS_TEST = bls_tests_yaml
|
||||
BLS_OUTPUT_DIR := $(OUTPUT_DIR)/$(BLS_TEST_REPO_NAME)
|
||||
BLS_BASE_URL := https://github.com/ethereum/$(BLS_TEST_REPO_NAME)/releases/download/$(BLS_TEST_VERSION)
|
||||
|
||||
# Fork-choice compliance tests from consensus-specs CI.
|
||||
# Pin to a specific workflow run ID for reproducibility. Update to pull newer vectors.
|
||||
COMPLIANCE_RUN_ID ?= 25410712895
|
||||
COMPLIANCE_PRESET ?= minimal
|
||||
COMPLIANCE_OUTPUT_DIR := $(OUTPUT_DIR)/tests/$(COMPLIANCE_PRESET)/fulu/fork_choice_compliance
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: clean $(OUTPUT_DIR) $(BLS_OUTPUT_DIR)
|
||||
all: clean $(OUTPUT_DIR) $(BLS_OUTPUT_DIR) $(COMPLIANCE_OUTPUT_DIR)
|
||||
|
||||
clean:
|
||||
rm -rf *.tar.gz $(OUTPUT_DIR) $(BLS_OUTPUT_DIR)
|
||||
@@ -31,3 +37,12 @@ $(BLS_OUTPUT_DIR):
|
||||
$(BLS_BASE_URL)/$(BLS_TEST).tar.gz
|
||||
tar -xzf *.tar.gz -C $(BLS_OUTPUT_DIR)
|
||||
rm -f *.tar.gz
|
||||
|
||||
$(COMPLIANCE_OUTPUT_DIR):
|
||||
@echo "Fetching fork-choice compliance tests (run $(COMPLIANCE_RUN_ID))..."
|
||||
@curl -L -f -H "Authorization: token $(GITHUB_TOKEN)" \
|
||||
"https://api.github.com/repos/ethereum/consensus-specs/actions/runs/$(COMPLIANCE_RUN_ID)/artifacts" \
|
||||
| python3 -c "import sys,json; arts=json.load(sys.stdin)['artifacts']; url=next(a['archive_download_url'] for a in arts if a['name']=='small.tar.gz'); print(url)" \
|
||||
| xargs curl -L -f --output compliance.tar.gz -H "Authorization: token $(GITHUB_TOKEN)"
|
||||
tar -xzf compliance.tar.gz -C $(OUTPUT_DIR)
|
||||
rm -f compliance.tar.gz
|
||||
|
||||
Reference in New Issue
Block a user