From 534bed39b36f94c0f662aa578ec3f313186faaff Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Tue, 18 Dec 2018 00:37:53 -0800 Subject: [PATCH] back to nightly --- .buildkite/pipeline-upload.sh | 2 +- ci/buildkite.yml | 2 +- ci/docker-run.sh | 1 + ci/test-nightly.sh | 32 ++++++++++++++++++++------------ scripts/coverage.sh | 8 +++++--- 5 files changed, 28 insertions(+), 17 deletions(-) diff --git a/.buildkite/pipeline-upload.sh b/.buildkite/pipeline-upload.sh index d256c2767ab56f..dd3aa146c76c10 100755 --- a/.buildkite/pipeline-upload.sh +++ b/.buildkite/pipeline-upload.sh @@ -14,7 +14,7 @@ buildkite-agent pipeline upload ci/buildkite.yml if [[ $BUILDKITE_BRANCH =~ ^pull ]]; then # Add helpful link back to the corresponding Github Pull Request - buildkite-agent annotate --style "info" \ + buildkite-agent annotate --style info --context pr-backlink \ "Github Pull Request: https://github.com/solana-labs/solana/$BUILDKITE_BRANCH" fi diff --git a/ci/buildkite.yml b/ci/buildkite.yml index d5da12727e4491..70885bf398db78 100644 --- a/ci/buildkite.yml +++ b/ci/buildkite.yml @@ -17,7 +17,7 @@ steps: #- command: "ci/docker-run.sh solanalabs/rust:1.31.0 ci/test-stable.sh" # name: "stable" # timeout_in_minutes: 30 - - command: "ci/docker-run.sh solanalabs/rust:1.31.0 ci/test-nightly.sh" + - command: "ci/docker-run.sh solanalabs/rust-nightly:2018-12-05 ci/test-nightly.sh" name: "nightly" timeout_in_minutes: 30 # TODO: Fix and re-enable test-large-network.sh diff --git a/ci/docker-run.sh b/ci/docker-run.sh index ed1858daa45bfb..ea1521500d9d4d 100755 --- a/ci/docker-run.sh +++ b/ci/docker-run.sh @@ -65,6 +65,7 @@ ARGS+=( --env BUILDKITE --env BUILDKITE_AGENT_ACCESS_TOKEN --env BUILDKITE_BRANCH + --env BUILDKITE_COMMIT --env BUILDKITE_JOB_ID --env BUILDKITE_TAG --env CI diff --git a/ci/test-nightly.sh b/ci/test-nightly.sh index 56e8ad8d3bc3ff..d3e14d4cafe74c 100755 --- a/ci/test-nightly.sh +++ b/ci/test-nightly.sh @@ -3,15 +3,18 @@ set -e cd "$(dirname "$0")/.." -if ci/is-pr.sh; then - affectedFiles="$(buildkite-agent meta-data get affected_files)" - echo "Affected files in this PR: $affectedFiles" - if [[ ! ":$affectedFiles:" =~ \.rs: ]]; then - echo "Skipping coverage build as no Rust files were modified" - exit 0 - else - echo "Modification to one or more Rust files detected" - fi +annotate() { + ${BUILDKITE:-false} && { + buildkite-agent annotate "$@" + } +} + +affectedFiles="$(buildkite-agent meta-data get affected_files)" +echo "Affected files in this PR: $affectedFiles" +if [[ ! ":$affectedFiles:" =~ \.rs: ]]; then + annotate --style info --context coverage-info \ + "Coverage skipped as no Rust files were modified" + exit 0 fi source ci/upload-ci-artifact.sh @@ -19,12 +22,17 @@ ci/version-check.sh nightly scripts/coverage.sh +upload-ci-artifact target/cov/report.tar.gz +annotate --style success --context lcov-report \ + 'lcov code coverage report: report.tar.gz' + 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 lcov.info -fi + bash <(curl -s https://codecov.io/bash) -X gcov -f target/cov/lcov.info -_ upload-ci-artifact target/cov/report.tar.gz + annotate --style success --context codecov.io \ + "CodeCov code coverage report: https://codecov.io/github/solana-labs/solana/commit/${BUILDKITE_COMMIT:0:9}" +fi diff --git a/scripts/coverage.sh b/scripts/coverage.sh index 312563917274ce..656427335e7771 100755 --- a/scripts/coverage.sh +++ b/scripts/coverage.sh @@ -6,7 +6,7 @@ # set -e -cd "$(dirname "$0")" +cd "$(dirname "$0")/.." _() { echo "--- $*" @@ -33,10 +33,12 @@ if [[ -d target/cov ]]; then fi rm -rf target/cov/$reportName +[[ -n $BUILDKITE ]] || maybeNightly="+nightly" + # TODO: why does |cargo cov| "appear" to work on stable? -_ cargo +nightly build --target-dir target/cov --all +_ cargo $maybeNightly build --target-dir target/cov --all # TODO: why does |test| cause a partial rebuild? -_ cargo +nightly test --target-dir target/cov --lib --all +_ cargo $maybeNightly test --target-dir target/cov --lib --all _ scripts/fetch-grcov.sh echo "--- grcov"