Fix sanity test flakiness by prebuilding binaries (#16530)
* Fix sanity test flakiness by prebuilding binaries * ignore shellcheck * bump * nudge * simplify
This commit is contained in:
@ -70,7 +70,7 @@ done
|
|||||||
|
|
||||||
source ci/upload-ci-artifact.sh
|
source ci/upload-ci-artifact.sh
|
||||||
source scripts/configure-metrics.sh
|
source scripts/configure-metrics.sh
|
||||||
source multinode-demo/common.sh
|
source multinode-demo/common.sh --prebuild
|
||||||
|
|
||||||
nodes=(
|
nodes=(
|
||||||
"multinode-demo/bootstrap-validator.sh \
|
"multinode-demo/bootstrap-validator.sh \
|
||||||
|
@ -9,7 +9,6 @@ extern crate self as solana_frozen_abi;
|
|||||||
pub mod abi_digester;
|
pub mod abi_digester;
|
||||||
#[cfg(RUSTC_WITH_SPECIALIZATION)]
|
#[cfg(RUSTC_WITH_SPECIALIZATION)]
|
||||||
pub mod abi_example;
|
pub mod abi_example;
|
||||||
|
|
||||||
#[cfg(RUSTC_WITH_SPECIALIZATION)]
|
#[cfg(RUSTC_WITH_SPECIALIZATION)]
|
||||||
mod hash;
|
mod hash;
|
||||||
|
|
||||||
|
@ -10,6 +10,11 @@
|
|||||||
# shellcheck source=net/common.sh
|
# shellcheck source=net/common.sh
|
||||||
source "$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. || exit 1; pwd)"/net/common.sh
|
source "$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. || exit 1; pwd)"/net/common.sh
|
||||||
|
|
||||||
|
prebuild=
|
||||||
|
if [[ $1 = "--prebuild" ]]; then
|
||||||
|
prebuild=true
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $(uname) != Linux ]]; then
|
if [[ $(uname) != Linux ]]; then
|
||||||
# Protect against unsupported configurations to prevent non-obvious errors
|
# Protect against unsupported configurations to prevent non-obvious errors
|
||||||
# later. Arguably these should be fatal errors but for now prefer tolerance.
|
# later. Arguably these should be fatal errors but for now prefer tolerance.
|
||||||
@ -39,14 +44,20 @@ else
|
|||||||
program="solana-$program"
|
program="solana-$program"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -r "$SOLANA_ROOT/$crate"/Cargo.toml ]]; then
|
|
||||||
maybe_package="--package solana-$crate"
|
|
||||||
fi
|
|
||||||
if [[ -n $NDEBUG ]]; then
|
if [[ -n $NDEBUG ]]; then
|
||||||
maybe_release=--release
|
maybe_release=--release
|
||||||
fi
|
fi
|
||||||
declare manifest_path="--manifest-path=$SOLANA_ROOT/$crate/Cargo.toml"
|
|
||||||
printf "cargo $CARGO_TOOLCHAIN run $manifest_path $maybe_release $maybe_package --bin %s %s -- " "$program"
|
# Prebuild binaries so that CI sanity check timeout doesn't include build time
|
||||||
|
if [[ $prebuild ]]; then
|
||||||
|
(
|
||||||
|
set -x
|
||||||
|
# shellcheck disable=SC2086 # Don't want to double quote
|
||||||
|
cargo $CARGO_TOOLCHAIN build $maybe_release --bin $program
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "cargo $CARGO_TOOLCHAIN run $maybe_release --bin %s %s -- " "$program"
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user