2018-12-17 10:11:02 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
|
|
|
|
annotate() {
|
|
|
|
${BUILDKITE:-false} && {
|
|
|
|
buildkite-agent annotate "$@"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
source ci/upload-ci-artifact.sh
|
2019-02-02 10:42:08 -08:00
|
|
|
source scripts/ulimit-n.sh
|
2018-12-17 10:11:02 -08:00
|
|
|
|
2020-06-16 09:32:16 -07:00
|
|
|
scripts/coverage.sh "$@"
|
|
|
|
|
|
|
|
if [[ -z $CI ]]; then
|
|
|
|
exit
|
|
|
|
fi
|
2018-12-17 10:11:02 -08:00
|
|
|
|
2019-06-06 12:20:47 -07:00
|
|
|
report=coverage-"${CI_COMMIT:0:9}".tar.gz
|
2018-12-17 10:11:02 -08:00
|
|
|
mv target/cov/report.tar.gz "$report"
|
|
|
|
upload-ci-artifact "$report"
|
2019-10-16 16:53:07 -07:00
|
|
|
|
2018-12-17 10:11:02 -08:00
|
|
|
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
|
2023-09-06 01:49:08 -07:00
|
|
|
codecov -t "${CODECOV_TOKEN}"
|
2018-12-17 10:11:02 -08:00
|
|
|
|
|
|
|
annotate --style success --context codecov.io \
|
2019-06-06 12:20:47 -07:00
|
|
|
"CodeCov report: https://codecov.io/github/solana-labs/solana/commit/${CI_COMMIT:0:9}"
|
2018-12-17 10:11:02 -08:00
|
|
|
fi
|