diff --git a/.maintain/ci/darwinia_test_script.sh b/.maintain/ci/darwinia_test_script.sh new file mode 100755 index 0000000000..29b7ae7e7d --- /dev/null +++ b/.maintain/ci/darwinia_test_script.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +echo -e "Test Darwinia ${1} ..." + +set -eux + +rustup default $RUST_TOOLCHAIN + +source ~/.cargo/env + +rustup --version +cargo --version +rustc --version + +case $TARGET in + # Without WASM + "native") + # There is some issue to build on ci server with SKIP_WASM_BUILD=1 + TARGET=native cargo test -p darwinia-${1} + echo -e "\e[0;32m +------------+ \n\e[0;32m | ${1} Pass | \n\e[0;32m +------------+ \e[0m" + ;; + + # With WASM + "wasm") + WASM_BUILD_TYPE=release cargo test -p darwinia-${1} + echo -e "\e[0;32m +------------+ \n\e[0;32m | ${1} Pass | \n\e[0;32m +------------+ \e[0m" + ;; +esac