2018-12-17 10:11:02 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
|
|
|
|
annotate() {
|
|
|
|
${BUILDKITE:-false} && {
|
|
|
|
buildkite-agent annotate "$@"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-18 17:33:28 -08:00
|
|
|
ci/affects-files.sh \
|
2018-12-18 17:33:28 -08:00
|
|
|
.rs$ \
|
2019-01-03 09:15:55 -08:00
|
|
|
Cargo.lock$ \
|
|
|
|
Cargo.toml$ \
|
2018-12-18 17:33:28 -08:00
|
|
|
ci/test-coverage.sh \
|
|
|
|
scripts/coverage.sh \
|
2018-12-18 17:33:28 -08:00
|
|
|
|| {
|
2018-12-18 17:33:28 -08:00
|
|
|
annotate --style info --context test-coverage \
|
2018-12-18 17:33:28 -08:00
|
|
|
"Coverage skipped as no .rs files were modified"
|
|
|
|
exit 0
|
|
|
|
}
|
2018-12-17 10:11:02 -08:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
scripts/coverage.sh
|
|
|
|
|
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"
|
|
|
|
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
|
|
|
|
bash <(curl -s https://codecov.io/bash) -X gcov -f target/cov/lcov.info
|
|
|
|
|
|
|
|
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
|