solana/ci/test-coverage.sh
Ryo Onodera 40ccade5cc
Update to rust 1.44.0 (#10585)
* Update rust 1.44.0

* Update rust nightly 1.46.0

* Update docs

* Fix clippy errors

* Compile all source code with stable and nightly

* Add another note

* script tweaks

* Fix a test...

* Add another workaround

* Add hack

* Increase timeout...

* Revert "Add hack"

This reverts commit 5960f087203be8792ec0728a6755288c317a2788.

* Revert "Add another workaround"

This reverts commit e14300d01ffd1b8e86e676662177545549b45c13.

* Require nightly rustfmt and use older nightly a bit

* Improve document a bit

* Revert now not-existing clippy check...
2020-06-17 01:32:16 +09:00

43 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
set -e
cd "$(dirname "$0")/.."
annotate() {
${BUILDKITE:-false} && {
buildkite-agent annotate "$@"
}
}
source ci/upload-ci-artifact.sh
source scripts/ulimit-n.sh
scripts/coverage.sh "$@"
if [[ -z $CI ]]; then
exit
fi
report=coverage-"${CI_COMMIT:0:9}".tar.gz
mv target/cov/report.tar.gz "$report"
upload-ci-artifact "$report"
gzip -f target/cov/coverage-stderr.log
upload-ci-artifact target/cov/coverage-stderr.log.gz
annotate --style success --context lcov-report \
"lcov report: <a href=\"artifact://$report\">$report</a>"
echo "--- codecov.io report"
if [[ -z "$CODECOV_TOKEN" ]]; then
echo "^^^ +++"
echo CODECOV_TOKEN undefined, codecov.io upload skipped
else
# We normalize CI to `1`; but codecov expects it to be `true` to detect Buildkite...
# Unfortunately, codecov.io fails sometimes:
# curl: (7) Failed to connect to codecov.io port 443: Connection timed out
CI=true bash <(while ! curl -sS --retry 5 --retry-delay 2 --retry-connrefused https://codecov.io/bash; do sleep 10; done) -Z -X gcov -f target/cov/lcov.info
annotate --style success --context codecov.io \
"CodeCov report: https://codecov.io/github/solana-labs/solana/commit/${CI_COMMIT:0:9}"
fi