openethereum/scripts/actions/validate-chainspecs.sh

38 lines
1.3 KiB
Bash
Raw Normal View History

Github Actions (#11528) * actions * add build scripts * chmod +x * remove clang env * add ARM builds * install LLVM for Windows * check LLVM * remove fi * check platform * fix LLVM install on windows * diff cache * remove unexpected token && * remove build directory cache from windows * remove Show ENV * remove checksum * fix cross and RUSTFLAGS * final fix for ARM and Windows build * typo * fix PATH for artifacts * sudo for install set PATH . for artifacts.zip * target names for artifacts * platform names for artifacts * remove ARM builds PLATFORM for build scripts * remove PLATFORM and change PATH for artifacts.zip * change PATH for artifacts * add sccache div to test and build * env RUSTC_WRAPPER sccache * sccache tag 0.2.13 up cache to latest v1.1.2 set SCCACHE_CACHE_SIZE: "1G" * remove dependencies from build * add audit check add tags for Build sccache --show-stats * remove beta and nightly toolchains * refactoring cache && sccache * fix Windows PATH o sccache HOME * "*"->'*' * install scache from https://github.com/mozilla/sccache/releases * fix lint * url for sccache * sccache up * shell: pwsh for sccache * up install script for sccache * fix link * splitting tests into multiple tasks * Jobs renaming * typo fix * remove Continue on error * TEST: remove cargo build cache * TEST: sccache show stats before * TEST: 1 * TEST: 2 * TEST: 3 MacOS fix sccache PATH * TEST 4: enable target cache * remove build * TEST 5: check cache and up Cargo.toml * TEST 6 * TEST 7: restore cargo cache splt build-tests and run-tests * TEST 8: fix build-test * TEST 9: fix sccache * TEST 10: lint run-test * TEST 11: build and test in one job * prepare for merge * test.yml -> check.yml * add install sccache script * sh -> ps1 * add os arg to ps cript * os up * fix os arg * ls sccache tar * echo url * echo sccache url * add swith for select platform * fix args * TEST CLEAN 1: clean biuld dir for all platforms * TEST CLEAN 2: incude build step continue-on-error in test * TEST CLEAN 3: script for clean * ready for merge
2020-03-04 15:49:43 +01:00
#!/bin/bash
set -e # fail on any error
set -u # treat unset variables as error
echo -e "*** Running \`validate_chainspecs.sh\`"
Github Actions (#11528) * actions * add build scripts * chmod +x * remove clang env * add ARM builds * install LLVM for Windows * check LLVM * remove fi * check platform * fix LLVM install on windows * diff cache * remove unexpected token && * remove build directory cache from windows * remove Show ENV * remove checksum * fix cross and RUSTFLAGS * final fix for ARM and Windows build * typo * fix PATH for artifacts * sudo for install set PATH . for artifacts.zip * target names for artifacts * platform names for artifacts * remove ARM builds PLATFORM for build scripts * remove PLATFORM and change PATH for artifacts.zip * change PATH for artifacts * add sccache div to test and build * env RUSTC_WRAPPER sccache * sccache tag 0.2.13 up cache to latest v1.1.2 set SCCACHE_CACHE_SIZE: "1G" * remove dependencies from build * add audit check add tags for Build sccache --show-stats * remove beta and nightly toolchains * refactoring cache && sccache * fix Windows PATH o sccache HOME * "*"->'*' * install scache from https://github.com/mozilla/sccache/releases * fix lint * url for sccache * sccache up * shell: pwsh for sccache * up install script for sccache * fix link * splitting tests into multiple tasks * Jobs renaming * typo fix * remove Continue on error * TEST: remove cargo build cache * TEST: sccache show stats before * TEST: 1 * TEST: 2 * TEST: 3 MacOS fix sccache PATH * TEST 4: enable target cache * remove build * TEST 5: check cache and up Cargo.toml * TEST 6 * TEST 7: restore cargo cache splt build-tests and run-tests * TEST 8: fix build-test * TEST 9: fix sccache * TEST 10: lint run-test * TEST 11: build and test in one job * prepare for merge * test.yml -> check.yml * add install sccache script * sh -> ps1 * add os arg to ps cript * os up * fix os arg * ls sccache tar * echo url * echo sccache url * add swith for select platform * fix args * TEST CLEAN 1: clean biuld dir for all platforms * TEST CLEAN 2: incude build step continue-on-error in test * TEST CLEAN 3: script for clean * ready for merge
2020-03-04 15:49:43 +01:00
ERR=0
time cargo build --release -p chainspec --verbose --color=always
echo -e "\n*** Validating custom chain specifications:"
Github Actions (#11528) * actions * add build scripts * chmod +x * remove clang env * add ARM builds * install LLVM for Windows * check LLVM * remove fi * check platform * fix LLVM install on windows * diff cache * remove unexpected token && * remove build directory cache from windows * remove Show ENV * remove checksum * fix cross and RUSTFLAGS * final fix for ARM and Windows build * typo * fix PATH for artifacts * sudo for install set PATH . for artifacts.zip * target names for artifacts * platform names for artifacts * remove ARM builds PLATFORM for build scripts * remove PLATFORM and change PATH for artifacts.zip * change PATH for artifacts * add sccache div to test and build * env RUSTC_WRAPPER sccache * sccache tag 0.2.13 up cache to latest v1.1.2 set SCCACHE_CACHE_SIZE: "1G" * remove dependencies from build * add audit check add tags for Build sccache --show-stats * remove beta and nightly toolchains * refactoring cache && sccache * fix Windows PATH o sccache HOME * "*"->'*' * install scache from https://github.com/mozilla/sccache/releases * fix lint * url for sccache * sccache up * shell: pwsh for sccache * up install script for sccache * fix link * splitting tests into multiple tasks * Jobs renaming * typo fix * remove Continue on error * TEST: remove cargo build cache * TEST: sccache show stats before * TEST: 1 * TEST: 2 * TEST: 3 MacOS fix sccache PATH * TEST 4: enable target cache * remove build * TEST 5: check cache and up Cargo.toml * TEST 6 * TEST 7: restore cargo cache splt build-tests and run-tests * TEST 8: fix build-test * TEST 9: fix sccache * TEST 10: lint run-test * TEST 11: build and test in one job * prepare for merge * test.yml -> check.yml * add install sccache script * sh -> ps1 * add os arg to ps cript * os up * fix os arg * ls sccache tar * echo url * echo sccache url * add swith for select platform * fix args * TEST CLEAN 1: clean biuld dir for all platforms * TEST CLEAN 2: incude build step continue-on-error in test * TEST CLEAN 3: script for clean * ready for merge
2020-03-04 15:49:43 +01:00
for spec in ethcore/res/*.json; do
if ! ./target/release/chainspec "$spec"; then ERR=1; fi
done
echo -e "\n*** Validating test-chain specifications:"
for spec in ethcore/res/ethereum/test-specs/*.json; do
if ! ./target/release/chainspec "$spec"; then ERR=1; fi
done
echo -e "\n*** Validating ethereum chain specifications:"
Github Actions (#11528) * actions * add build scripts * chmod +x * remove clang env * add ARM builds * install LLVM for Windows * check LLVM * remove fi * check platform * fix LLVM install on windows * diff cache * remove unexpected token && * remove build directory cache from windows * remove Show ENV * remove checksum * fix cross and RUSTFLAGS * final fix for ARM and Windows build * typo * fix PATH for artifacts * sudo for install set PATH . for artifacts.zip * target names for artifacts * platform names for artifacts * remove ARM builds PLATFORM for build scripts * remove PLATFORM and change PATH for artifacts.zip * change PATH for artifacts * add sccache div to test and build * env RUSTC_WRAPPER sccache * sccache tag 0.2.13 up cache to latest v1.1.2 set SCCACHE_CACHE_SIZE: "1G" * remove dependencies from build * add audit check add tags for Build sccache --show-stats * remove beta and nightly toolchains * refactoring cache && sccache * fix Windows PATH o sccache HOME * "*"->'*' * install scache from https://github.com/mozilla/sccache/releases * fix lint * url for sccache * sccache up * shell: pwsh for sccache * up install script for sccache * fix link * splitting tests into multiple tasks * Jobs renaming * typo fix * remove Continue on error * TEST: remove cargo build cache * TEST: sccache show stats before * TEST: 1 * TEST: 2 * TEST: 3 MacOS fix sccache PATH * TEST 4: enable target cache * remove build * TEST 5: check cache and up Cargo.toml * TEST 6 * TEST 7: restore cargo cache splt build-tests and run-tests * TEST 8: fix build-test * TEST 9: fix sccache * TEST 10: lint run-test * TEST 11: build and test in one job * prepare for merge * test.yml -> check.yml * add install sccache script * sh -> ps1 * add os arg to ps cript * os up * fix os arg * ls sccache tar * echo url * echo sccache url * add swith for select platform * fix args * TEST CLEAN 1: clean biuld dir for all platforms * TEST CLEAN 2: incude build step continue-on-error in test * TEST CLEAN 3: script for clean * ready for merge
2020-03-04 15:49:43 +01:00
for spec in ethcore/res/ethereum/*.json; do
if ! ./target/release/chainspec "$spec"; then ERR=1; fi
done
echo -e "\n*** Checking mainnet EIPs against test specifications:"
for spec in "ethcore/res/ethereum/foundation.json" "ethcore/res/ethereum/classic.json"; do
for fork in "frontier" "homestead" "byzantium" "constantinople" "st_peters" "istanbul"; do
for eip in $(grep --only-matching "eip.*Transition" ethcore/res/ethereum/test-specs/${fork}_test.json); do
if ! grep -q $eip $spec; then
echo "ERROR: $fork $eip is missing in the $spec"
ERR=1
else
echo "$spec contains $fork $eip"
fi
done
done
Github Actions (#11528) * actions * add build scripts * chmod +x * remove clang env * add ARM builds * install LLVM for Windows * check LLVM * remove fi * check platform * fix LLVM install on windows * diff cache * remove unexpected token && * remove build directory cache from windows * remove Show ENV * remove checksum * fix cross and RUSTFLAGS * final fix for ARM and Windows build * typo * fix PATH for artifacts * sudo for install set PATH . for artifacts.zip * target names for artifacts * platform names for artifacts * remove ARM builds PLATFORM for build scripts * remove PLATFORM and change PATH for artifacts.zip * change PATH for artifacts * add sccache div to test and build * env RUSTC_WRAPPER sccache * sccache tag 0.2.13 up cache to latest v1.1.2 set SCCACHE_CACHE_SIZE: "1G" * remove dependencies from build * add audit check add tags for Build sccache --show-stats * remove beta and nightly toolchains * refactoring cache && sccache * fix Windows PATH o sccache HOME * "*"->'*' * install scache from https://github.com/mozilla/sccache/releases * fix lint * url for sccache * sccache up * shell: pwsh for sccache * up install script for sccache * fix link * splitting tests into multiple tasks * Jobs renaming * typo fix * remove Continue on error * TEST: remove cargo build cache * TEST: sccache show stats before * TEST: 1 * TEST: 2 * TEST: 3 MacOS fix sccache PATH * TEST 4: enable target cache * remove build * TEST 5: check cache and up Cargo.toml * TEST 6 * TEST 7: restore cargo cache splt build-tests and run-tests * TEST 8: fix build-test * TEST 9: fix sccache * TEST 10: lint run-test * TEST 11: build and test in one job * prepare for merge * test.yml -> check.yml * add install sccache script * sh -> ps1 * add os arg to ps cript * os up * fix os arg * ls sccache tar * echo url * echo sccache url * add swith for select platform * fix args * TEST CLEAN 1: clean biuld dir for all platforms * TEST CLEAN 2: incude build step continue-on-error in test * TEST CLEAN 3: script for clean * ready for merge
2020-03-04 15:49:43 +01:00
done
exit $ERR