Skip to content

Commit

Permalink
back to nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Dec 18, 2018
1 parent afe6ca5 commit 534bed3
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipeline-upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

2 changes: 1 addition & 1 deletion ci/buildkite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions ci/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 20 additions & 12 deletions ci/test-nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,36 @@ 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
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: <a href="artifact://target/cov/report.tar.gz">report.tar.gz</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 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
8 changes: 5 additions & 3 deletions scripts/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#

set -e
cd "$(dirname "$0")"
cd "$(dirname "$0")/.."

_() {
echo "--- $*"
Expand All @@ -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"
Expand Down

0 comments on commit 534bed3

Please sign in to comment.