lighthouse/testing/ef_tests/Makefile

45 lines
1.3 KiB
Makefile
Raw Normal View History

2023-03-24 19:32:58 +00:00
TESTS_TAG := v1.3.0-rc.1 # FIXME: move to latest
TESTS = general minimal mainnet
2019-10-22 03:35:35 +00:00
TARBALLS = $(patsubst %,%-$(TESTS_TAG).tar.gz,$(TESTS))
REPO_NAME := consensus-spec-tests
OUTPUT_DIR := ./$(REPO_NAME)
BASE_URL := https://github.com/ethereum/$(REPO_NAME)/releases/download/$(TESTS_TAG)
BLS_TEST_REPO_NAME := bls12-381-tests
BLS_TEST_TAG := v0.1.1
BLS_TEST = bls_tests_yaml
BLS_TARBALL = $(patsubst %,%-$(BLS_TEST_TAG).tar.gz,$(BLS_TEST))
BLS_OUTPUT_DIR := $(OUTPUT_DIR)/$(BLS_TEST_REPO_NAME)
BLS_BASE_URL := https://github.com/ethereum/$(BLS_TEST_REPO_NAME)/releases/download/$(BLS_TEST_TAG)
WGET := $(if $(LIGHTHOUSE_GITHUB_TOKEN),wget --header="Authorization: $(LIGHTHOUSE_GITHUB_TOKEN)",wget)
all:
make $(OUTPUT_DIR)
make $(BLS_OUTPUT_DIR)
2019-10-22 03:35:35 +00:00
$(OUTPUT_DIR): $(TARBALLS)
mkdir $(OUTPUT_DIR)
2019-10-22 03:35:35 +00:00
for test_tarball in $^; do \
tar -xzf $$test_tarball -C $(OUTPUT_DIR);\
done
$(BLS_OUTPUT_DIR):
mkdir $(BLS_OUTPUT_DIR)
$(WGET) $(BLS_BASE_URL)/$(BLS_TEST).tar.gz -O $(BLS_TARBALL)
tar -xzf $(BLS_TARBALL) -C $(BLS_OUTPUT_DIR)
2019-10-22 03:35:35 +00:00
%-$(TESTS_TAG).tar.gz:
$(WGET) $(BASE_URL)/$*.tar.gz -O $@
2019-10-22 03:35:35 +00:00
clean-test-files:
rm -rf $(OUTPUT_DIR) $(BLS_OUTPUT_DIR)
2019-10-22 03:35:35 +00:00
clean-archives:
rm -f $(TARBALLS) $(BLS_TARBALL)
2019-10-22 03:35:35 +00:00
clean: clean-test-files clean-archives
.PHONY: clean clean-archives clean-test-files