Add explicit validator-cuda crate (#5985)

This commit is contained in:
Michael Vines
2019-09-19 20:50:34 -07:00
committed by GitHub
parent d379786c90
commit 1d0be265d9
32 changed files with 778 additions and 706 deletions

View File

@ -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

View File

@ -13,7 +13,7 @@ programDir="$2"
(
set -x
cd "$programDir"
cargo build --all --release
cargo build --release
)
for dir in "$programDir"/*; do

View File

@ -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