ci: use codecov command line tool (#33132)

* ci: install codecov to nigthly image

* ci: use codecov command line tool
This commit is contained in:
Yihau Chen 2023-09-06 16:49:08 +08:00 committed by GitHub
parent a8e83c8720
commit 903c615559
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -10,4 +10,8 @@ RUN set -x \
&& cargo --version \
&& cargo install grcov \
&& rustc +nightly-$date --version \
&& cargo +nightly-$date --version
&& cargo +nightly-$date --version \
# codecov
&& curl -Os https://uploader.codecov.io/latest/linux/codecov \
&& chmod +x codecov \
&& mv codecov /usr/bin

View File

@ -29,10 +29,7 @@ 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 --fail https://codecov.io/bash; do sleep 10; done) -Z -X gcov -f target/cov/lcov.info
codecov -t "${CODECOV_TOKEN}"
annotate --style success --context codecov.io \
"CodeCov report: https://codecov.io/github/solana-labs/solana/commit/${CI_COMMIT:0:9}"