2019-03-18 16:18:57 +00:00
|
|
|
SPEC_DIR = ./specs
|
|
|
|
SCRIPT_DIR = ./scripts
|
|
|
|
BUILD_DIR = ./build
|
2019-03-18 20:14:26 +00:00
|
|
|
UTILS_DIR = ./utils
|
2019-03-18 16:18:57 +00:00
|
|
|
|
|
|
|
|
2019-03-18 22:20:24 +00:00
|
|
|
.PHONY: clean all test
|
|
|
|
|
|
|
|
|
|
|
|
all: $(BUILD_DIR)/phase0
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf $(BUILD_DIR)
|
|
|
|
|
|
|
|
|
2019-03-18 22:30:16 +00:00
|
|
|
# runs a limited set of tests against a minimal config
|
|
|
|
# run pytest with `-m` option to full suite
|
2019-03-18 22:20:24 +00:00
|
|
|
test:
|
|
|
|
pytest -m "sanity and minimal_config" tests/
|
2019-03-18 16:18:57 +00:00
|
|
|
|
2019-03-18 22:30:16 +00:00
|
|
|
|
2019-03-18 16:18:57 +00:00
|
|
|
$(BUILD_DIR)/phase0:
|
2019-03-18 20:14:26 +00:00
|
|
|
mkdir -p $@
|
2019-03-18 18:51:52 +00:00
|
|
|
python3 $(SCRIPT_DIR)/phase0/build_spec.py $(SPEC_DIR)/core/0_beacon-chain.md $@/spec.py
|
2019-03-18 20:14:26 +00:00
|
|
|
mkdir -p $@/utils
|
|
|
|
cp $(UTILS_DIR)/phase0/* $@/utils
|
|
|
|
cp $(UTILS_DIR)/phase0/state_transition.py $@
|
|
|
|
touch $@/__init__.py $@/utils/__init__.py
|