openethereum/scripts/gitlab/test.sh
Denis S. Soldatov aka General-Beck bd3bc5c168 Updating the CI system (#8765)
* Updating the CI system with the publication of releases and binary files on github

Signed-off-by: Denis S. Soldatov aka General-Beck <general.beck@gmail.com>

* add missed scripts

* chmod +x scripts

* fix download link for github

* rebuilding CI scripts

* small fixes

* update submodule wasm tests

* ci: fix merge leftovers

* ci: remove gitlab-next from ci triggers

* ci: fix git add in docs script

* ci: use nightly instead of master for publish triggers

* ci: remove sleep from gitlab config

* ci: replace ':' with '-' in gitlab targets

* ci: fix recursive copy in docs script
2018-08-26 00:44:08 +02:00

29 lines
978 B
Bash
Executable File

#!/bin/bash
# ARGUMENT $1 Rust flavor to test with (stable/beta/nightly)
set -e # fail on any error
set -u # treat unset variables as error
rustup default $1
if [[ "$CI_COMMIT_REF_NAME" = "beta" || "$CI_COMMIT_REF_NAME" = "stable" ]]; then
export GIT_COMPARE=$CI_COMMIT_REF_NAME~;
else
export GIT_COMPARE=master;
fi
export RUST_FILES_MODIFIED="$(git --no-pager diff --name-only $GIT_COMPARE...$CI_COMMIT_SHA | grep -v -e ^\\. -e ^LICENSE -e ^README.md -e ^test.sh -e ^windows/ -e ^scripts/ -e ^mac/ -e ^nsis/ | wc -l)"
echo "RUST_FILES_MODIFIED: $RUST_FILES_MODIFIED"
git submodule update --init --recursive
rustup show
if [[ "${RUST_FILES_MODIFIED}" == "0" ]];
then echo "__________Skipping Rust tests since no Rust files modified__________";
else ./test.sh || exit $?;
fi
# if [[ "$CI_COMMIT_REF_NAME" == "nightly" ]];
# ### @TODO re-enable fail after https://github.com/paritytech/parity-import-tests/issues/3
# then sh scripts/aura-test.sh; # || exit $?;
# fi