Refactor docs into mdbook (#547)

* Refactor documentation, ef_tests makefile

* Add makefile to root

* Tidy readme

* Fix readme badges

* Tidy logs

* Add terminalize gif

* Update readme image

* Update readme image

* Tidy logs

* Update readme image

* Update readme

* Update readme

* Fix book link

* Update makefiles

* Update book

* Fix link in book

* Add readme for book

* Remove old docs, move api spec YAML

* Fix eth2/ dir readme

* Add readme for lcli

* Add about this book section

* Minor formatting improvements

* Address mehdi's comments
This commit is contained in:
Paul Hauner
2019-10-02 11:04:56 +10:00
committed by GitHub
parent 7eb82125ef
commit 9aedb12bfc
36 changed files with 701 additions and 1152 deletions

View File

@@ -1,31 +1,30 @@
TESTS_TAG := v0.8.3
TESTS = general minimal mainnet
.PHONY: tests
TESTS_BASE_DIR := ./tests/ef_tests
REPO_NAME := eth2.0-spec-tests
OUTPUT_DIR := $(TESTS_BASE_DIR)/$(REPO_NAME)
BASE_URL := https://github.com/ethereum/$(REPO_NAME)/releases/download/$(SPEC_VERSION)
EF_TESTS = "tests/ef_tests"
# Builds the entire workspace in release (optimized).
#
# Binaries will most likely be found in `./target/release`
release:
cargo build --all --release
cargo build --release --all
clean_ef_tests:
rm -r $(OUTPUT_DIR)
# Runs the full workspace tests, without downloading any additional test
# vectors.
test:
cargo test --all --all-features --release
ef_tests: download_tests extract_tests
mkdir $(OUTPUT_DIR)
for test in $(TESTS); do \
tar -C $(OUTPUT_DIR) -xvf $(TESTS_BASE_DIR)/$$test.tar ;\
rm $(TESTS_BASE_DIR)/$$test.tar ;\
done
# Runs the entire test suite, downloading test vectors if required.
test-full: make-ef-tests test
extract_tests:
for test in $(TESTS); do \
gzip -df $(TESTS_BASE_DIR)/$$test.tar.gz ;\
done
# Runs the makefile in the `ef_tests` repo.
#
# May download and extract an archive of test vectors from the ethereum
# repositories. At the time of writing, this was several hundred MB of
# downloads which extracts into several GB of test vectors.
make-ef-tests:
make -C $(EF_TESTS)
download_tests:
for test in $(TESTS); do \
wget -P $(TESTS_BASE_DIR) $(BASE_URL)/$$test.tar.gz; \
done
# Performs a `cargo` clean and cleans the `ef_tests` directory.
clean:
cargo clean
make -C $(EF_TESTS) clean