solana/ci/coverage.sh

27 lines
420 B
Bash
Raw Normal View History

2018-05-21 23:02:54 -07:00
#!/bin/bash -e
2018-05-27 18:19:07 -07:00
cd "$(dirname "$0")/.."
2018-05-21 23:02:54 -07:00
2018-05-22 16:57:14 -07:00
if [[ -r ~/.cargo/env ]]; then
# Pick up local install of kcov/cargo-kcov
2018-05-27 18:19:07 -07:00
# shellcheck disable=SC1090
2018-05-22 16:57:14 -07:00
source ~/.cargo/env
fi
rustc --version
cargo --version
kcov --version
cargo-kcov --version
2018-05-21 23:02:54 -07:00
export RUST_BACKTRACE=1
cargo build
2018-05-25 21:27:41 -07:00
cargo kcov --lib
2018-05-21 23:02:54 -07:00
if [[ -z "$CODECOV_TOKEN" ]]; then
echo CODECOV_TOKEN undefined
else
bash <(curl -s https://codecov.io/bash)
2018-05-21 23:02:54 -07:00
fi
exit 0