Improve coverage.sh's environment awareness (#7101)

* Improve coverage.sh's environment awareness

* Move version check into ci/rust-version.sh

* Embrace bashism
This commit is contained in:
Ryo Onodera 2019-11-23 14:53:39 +09:00 committed by GitHub
parent 306fbd8bd8
commit 7f87ac4b65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 4 deletions

View File

@ -13,8 +13,18 @@
# $ source ci/rust-version.sh
#
stable_version=1.39.0
nightly_version=2019-11-13
if [[ -n $RUST_STABLE_VERSION ]]; then
stable_version="$RUST_STABLE_VERSION"
else
stable_version=1.39.0
fi
if [[ -n $RUST_NIGHTLY_VERSION ]]; then
nightly_version="$RUST_NIGHTLY_VERSION"
else
nightly_version=2019-11-13
fi
export rust_stable="$stable_version"
export rust_stable_docker_image=solanalabs/rust:"$stable_version"

View File

@ -13,7 +13,7 @@ source ci/_
reportName="lcov-${CI_COMMIT:0:9}"
if [[ -z $1 ]]; then
packages=( --lib --all --exclude solana-local-cluster )
packages=( --lib --all --exclude solana-local-cluster )
else
packages=( "$@" )
fi
@ -24,7 +24,7 @@ coverageFlags+=("-Ccodegen-units=1") # Disable code generation parallelism w
coverageFlags+=("-Cinline-threshold=0") # Disable inlining, which complicates control flow.
coverageFlags+=("-Coverflow-checks=off") # Disable overflow checks, which create unnecessary branches.
export RUSTFLAGS="${coverageFlags[*]}"
export RUSTFLAGS="${coverageFlags[*]} $RUSTFLAGS"
export CARGO_INCREMENTAL=0
export RUST_BACKTRACE=1
export RUST_MIN_STACK=8388608