Skip to content

Commit

Permalink
Upload code coverage report to buildkite
Browse files Browse the repository at this point in the history
Because I can't figure out why codecov.io can't parse our lcov files.
  • Loading branch information
garious committed Oct 4, 2018
1 parent c812c3f commit 06148f5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ci/buildkite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ steps:
env:
CARGO_TARGET_CACHE_NAME: "stable"
timeout_in_minutes: 30
- command: "ci/docker-run.sh solanalabs/rust-nightly:2018-09-28 ci/test-bench.sh"
- command: "ci/docker-run.sh solanalabs/rust-nightly:2018-10-04 ci/test-bench.sh"
name: "bench [public]"
env:
CARGO_TARGET_CACHE_NAME: "nightly"
timeout_in_minutes: 30
- command: "ci/shellcheck.sh"
name: "shellcheck [public]"
timeout_in_minutes: 20
- command: "ci/docker-run.sh solanalabs/rust-nightly:2018-09-28 ci/test-nightly.sh"
- command: "ci/docker-run.sh solanalabs/rust-nightly:2018-10-04 ci/test-nightly.sh"
name: "nightly [public]"
env:
CARGO_TARGET_CACHE_NAME: "nightly"
Expand Down
1 change: 0 additions & 1 deletion ci/docker-rust-nightly/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ ARG date
RUN set -x && \
rustup install nightly-$date && \
rustup default nightly-$date && \
rustup component add clippy-preview --toolchain=nightly-$date && \
rustc --version && \
cargo --version && \
cargo +nightly-$date install cargo-cov
1 change: 1 addition & 0 deletions ci/docker-rust/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ RUN set -x && \
apt install -y \
buildkite-agent \
cmake \
lcov \
libclang-common-7-dev \
llvm-7 \
rsync \
Expand Down
10 changes: 6 additions & 4 deletions ci/test-nightly.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash -e

cd "$(dirname "$0")/.."
source ci/upload_ci_artifact.sh

ci/version-check.sh nightly
export RUST_BACKTRACE=1
Expand Down Expand Up @@ -38,12 +39,13 @@ fi
_ cargo cov clean
_ cargo cov test --lib
_ ./grcov . -t lcov > lcov.info
_ genhtml -o target/cov/report --show-details --highlight --ignore-errors source --legend lcov.info
upload_ci_artifact target/cov/report/*

if [[ -z "$CODECOV_TOKEN" ]]; then
echo CODECOV_TOKEN undefined
genhtml -o target/cov/report --show-details --highlight --ignore-errors source --legend lcov.info
echo --- Coverage report:
ls -l target/cov/report/index.html
else
bash <(curl -s https://codecov.io/bash) -X gcov
true
# TODO: Why doesn't codecov grok our lcov files?
#bash <(curl -s https://codecov.io/bash) -X gcov
fi
2 changes: 1 addition & 1 deletion ci/version-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require() {

case ${1:-stable} in
nightly)
require rustc 1.30.[0-9]+-nightly
require rustc 1.31.[0-9]+-nightly
require cargo 1.31.[0-9]+-nightly
;;
stable)
Expand Down

0 comments on commit 06148f5

Please sign in to comment.