7781cbbc57
* ci: reduce gitlab pipelines significantly * ci: build pipeline for PR * ci: remove dead weight * ci: remove github release script * ci: remove forever broken aura tests * ci: add random stuff to the end of the pipes * ci: add wind and mac to the end of the pipe * ci: remove snap artifacts * ci: (re)move dockerfiles * ci: clarify job names * ci: add cargo audit job * ci: make audit script executable * ci: ignore snap and docker files for rust check * ci: simplify audit script * ci: rename misc to optional * ci: add publish script to releaseable branches * ci: more verbose cp command for windows build * ci: fix weird binary checksum logic in push script * ci: fix regex in push script for windows * ci: simplify gitlab caching * docs: align README with ci changes * ci: specify default cargo target dir * ci: print verbose environment * ci: proper naming of scripts * ci: restore docker files * ci: use docker hub file * ci: use cargo home instead of cargo target dir * ci: touch random rust file to trigger real builds * ci: set cargo target dir for audit script * ci: remove temp file * ci: don't export the cargo target dir in the audit script * ci: fix windows unbound variable * docs: fix gitlab badge path * rename deprecated gitlab ci variables https://docs.gitlab.com/ee/ci/variables/#9-0-renaming * ci: fix git compare for nightly builds * test: skip c++ example for all platforms but linux * ci: add random rust file to trigger tests * ci: remove random rust file * disable cpp lib test for mac, win and beta (#9686)
102 lines
1.9 KiB
Bash
Executable File
102 lines
1.9 KiB
Bash
Executable File
#!/bin/sh
|
|
# Running Parity Full Test Suite
|
|
|
|
FEATURES="json-tests,ci-skip-issue"
|
|
OPTIONS="--release"
|
|
VALIDATE=1
|
|
THREADS=8
|
|
|
|
case $1 in
|
|
--no-json)
|
|
FEATURES="ipc"
|
|
shift # past argument=value
|
|
;;
|
|
--no-release)
|
|
OPTIONS=""
|
|
shift
|
|
;;
|
|
--no-validate)
|
|
VALIDATE=0
|
|
shift
|
|
;;
|
|
--no-run)
|
|
OPTIONS="--no-run"
|
|
shift
|
|
;;
|
|
*)
|
|
# unknown option
|
|
;;
|
|
esac
|
|
|
|
set -e
|
|
|
|
|
|
validate () {
|
|
if [ "$VALIDATE" -eq "1" ]
|
|
then
|
|
echo "________Validate build________"
|
|
time cargo check $@ --no-default-features
|
|
time cargo check $@ --manifest-path util/io/Cargo.toml --no-default-features
|
|
time cargo check $@ --manifest-path util/io/Cargo.toml --features "mio"
|
|
|
|
# Validate chainspecs
|
|
echo "________Validate chainspecs________"
|
|
time ./scripts/validate_chainspecs.sh
|
|
else
|
|
echo "# not validating due to \$VALIDATE!=1"
|
|
fi
|
|
}
|
|
|
|
cpp_test () {
|
|
case $CARGO_TARGET in
|
|
(x86_64-unknown-linux-gnu)
|
|
# Running the C++ example
|
|
echo "________Running the C++ example________"
|
|
cd parity-clib-examples/cpp && \
|
|
mkdir -p build && \
|
|
cd build && \
|
|
cmake .. && \
|
|
make -j $THREADS && \
|
|
./parity-example && \
|
|
cd .. && \
|
|
rm -rf build && \
|
|
cd ../..
|
|
;;
|
|
(*)
|
|
echo "________Skipping the C++ example________"
|
|
;;
|
|
esac
|
|
}
|
|
|
|
cargo_test () {
|
|
echo "________Running Parity Full Test Suite________"
|
|
git submodule update --init --recursive
|
|
time cargo test $OPTIONS --features "$FEATURES" --all $@ -- --test-threads $THREADS
|
|
}
|
|
|
|
|
|
if [ "$CARGO_TARGET" ]
|
|
then
|
|
validate --target $CARGO_TARGET
|
|
else
|
|
validate
|
|
fi
|
|
|
|
test "${RUN_TESTS}" = "all" && cpp_test
|
|
|
|
if [ "$CARGO_TARGET" ]
|
|
then
|
|
|
|
case "${RUN_TESTS}" in
|
|
(cargo|all)
|
|
cargo_test --target $CARGO_TARGET $@
|
|
;;
|
|
('')
|
|
cargo_test --no-run --target $CARGO_TARGET $@
|
|
;;
|
|
esac
|
|
else
|
|
cargo_test $@
|
|
fi
|
|
|