Add explicit validator-cuda crate (#5985)
This commit is contained in:
@ -20,6 +20,11 @@ cargo=cargo
|
||||
cargoFeatures="$2"
|
||||
debugBuild="$3"
|
||||
|
||||
if [[ -n $cargoFeatures && $cargoFeatures != cuda ]]; then
|
||||
echo "Unsupported feature flag: $cargoFeatures"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
buildVariant=release
|
||||
maybeReleaseFlag=--release
|
||||
if [[ -n "$debugBuild" ]]; then
|
||||
@ -36,10 +41,13 @@ SECONDS=0
|
||||
(
|
||||
set -x
|
||||
# shellcheck disable=SC2086 # Don't want to double quote $rust_version
|
||||
$cargo $rust_version build --all $maybeReleaseFlag --features="$cargoFeatures"
|
||||
$cargo $rust_version build --all $maybeReleaseFlag
|
||||
)
|
||||
|
||||
BINS=(
|
||||
solana
|
||||
solana-bench-exchange
|
||||
solana-bench-tps
|
||||
solana-drone
|
||||
solana-gossip
|
||||
solana-install
|
||||
@ -48,9 +56,6 @@ BINS=(
|
||||
solana-ledger-tool
|
||||
solana-replicator
|
||||
solana-validator
|
||||
solana
|
||||
solana-bench-exchange
|
||||
solana-bench-tps
|
||||
)
|
||||
|
||||
#XXX: Ensure `solana-genesis` is built LAST!
|
||||
@ -65,7 +70,7 @@ done
|
||||
(
|
||||
set -x
|
||||
# shellcheck disable=SC2086 # Don't want to double quote $rust_version
|
||||
$cargo $rust_version build $maybeReleaseFlag "${binArgs[@]}" --features="$cargoFeatures"
|
||||
$cargo $rust_version build $maybeReleaseFlag "${binArgs[@]}"
|
||||
)
|
||||
|
||||
mkdir -p "$installDir/bin"
|
||||
@ -73,6 +78,22 @@ for bin in "${BINS[@]}"; do
|
||||
cp -fv "target/$buildVariant/$bin" "$installDir"/bin
|
||||
done
|
||||
|
||||
|
||||
if [[ "$cargoFeatures" = cuda ]]; then
|
||||
(
|
||||
set -x
|
||||
./fetch-perf-libs.sh
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
source ./target/perf-libs/env.sh
|
||||
|
||||
cd validator-cuda
|
||||
# shellcheck disable=SC2086 # Don't want to double quote $rust_version
|
||||
cargo $rust_version build $maybeReleaseFlag
|
||||
)
|
||||
cp -fv "target/$buildVariant/solana-validator-cuda" "$installDir"/bin
|
||||
fi
|
||||
|
||||
for dir in programs/*; do
|
||||
for program in echo target/$buildVariant/deps/libsolana_"$(basename "$dir")".{so,dylib,dll}; do
|
||||
if [[ -f $program ]]; then
|
||||
|
@ -13,7 +13,7 @@ programDir="$2"
|
||||
(
|
||||
set -x
|
||||
cd "$programDir"
|
||||
cargo build --all --release
|
||||
cargo build --release
|
||||
)
|
||||
|
||||
for dir in "$programDir"/*; do
|
||||
|
@ -15,7 +15,7 @@ reportName="lcov-${CI_COMMIT:0:9}"
|
||||
if [[ -n $1 ]]; then
|
||||
crate="--manifest-path=$1/Cargo.toml"
|
||||
else
|
||||
crate="--all --exclude solana-local-cluster"
|
||||
crate="--all --exclude solana-local-cluster --exclude solana-validator-cuda"
|
||||
fi
|
||||
|
||||
coverageFlags=(-Zprofile) # Enable coverage
|
||||
|
Reference in New Issue
Block a user