Remove CUDA feature (#6094)
This commit is contained in:
@ -37,14 +37,12 @@ if [[ -z $CHANNEL_OR_TAG ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
maybeCUDA=
|
||||
case "$CI_OS_NAME" in
|
||||
osx)
|
||||
TARGET=x86_64-apple-darwin
|
||||
;;
|
||||
linux)
|
||||
TARGET=x86_64-unknown-linux-gnu
|
||||
maybeCUDA=cuda
|
||||
;;
|
||||
windows)
|
||||
TARGET=x86_64-pc-windows-msvc
|
||||
@ -70,55 +68,17 @@ echo --- Creating tarball
|
||||
) > solana-release/version.yml
|
||||
|
||||
source ci/rust-version.sh stable
|
||||
scripts/cargo-install-all.sh +"$rust_stable" solana-release $maybeCUDA
|
||||
scripts/cargo-install-all.sh +"$rust_stable" solana-release
|
||||
|
||||
# Reduce the Windows archive size until
|
||||
# https://github.com/appveyor/ci/issues/2997 is fixed
|
||||
if [[ -n $APPVEYOR ]]; then
|
||||
rm -f solana-release/bin/solana-validator.exe solana-release/bin/solana-bench-exchange.exe
|
||||
rm -f \
|
||||
solana-release/bin/solana-validator.exe \
|
||||
solana-release/bin/solana-bench-exchange.exe \
|
||||
|
||||
fi
|
||||
|
||||
if [[ -n $maybeCUDA ]]; then
|
||||
# Wrap `solana-validator-cuda` with a script that loads perf-libs
|
||||
# automatically if possible
|
||||
mkdir -p solana-release/target
|
||||
cp -a target/perf-libs solana-release/target/perf-libs
|
||||
mkdir -p solana-release/bin/_
|
||||
cp solana-release/bin/solana-validator-cuda solana-release/bin/_/solana-validator-cuda
|
||||
cp -a solana-release/bin/deps solana-release/bin/_/deps
|
||||
cat > solana-release/bin/solana-validator-cuda <<'EOF'
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
SOLANA_ROOT="$(dirname "$0")"/..
|
||||
if [[ -f "$SOLANA_ROOT"/target/perf-libs/env.sh ]]; then
|
||||
source "$SOLANA_ROOT"/target/perf-libs/env.sh
|
||||
fi
|
||||
if [[ -z $SOLANA_PERF_LIBS_CUDA ]]; then
|
||||
echo
|
||||
echo Error: SOLANA_PERF_LIBS_CUDA environment variable undefined
|
||||
exit 1
|
||||
fi
|
||||
exec "$SOLANA_ROOT"/bin/_/solana-validator-cuda "$@"
|
||||
EOF
|
||||
chmod +x solana-release/bin/solana-validator-cuda
|
||||
fi
|
||||
|
||||
# TODO: Remove scripts/ and multinode/... from tarball
|
||||
cp -a scripts multinode-demo solana-release/
|
||||
|
||||
# Add a wrapper script for validator.sh
|
||||
# TODO: Remove multinode/... from tarball
|
||||
cat > solana-release/bin/validator.sh <<'EOF'
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
cd "$(dirname "$0")"/..
|
||||
export USE_INSTALL=1
|
||||
export REQUIRE_LEDGER_DIR=1
|
||||
export REQUIRE_KEYPAIRS=1
|
||||
exec multinode-demo/validator.sh "$@"
|
||||
EOF
|
||||
chmod +x solana-release/bin/validator.sh
|
||||
|
||||
tar cvf solana-release-$TARGET.tar solana-release
|
||||
bzip2 solana-release-$TARGET.tar
|
||||
cp solana-release/bin/solana-install-init solana-install-init-$TARGET
|
||||
|
@ -15,7 +15,7 @@ _ cargo +"$rust_stable" fmt --all -- --check
|
||||
# Clippy gets stuck for unknown reasons if sdk-c is included in the build, so check it separately.
|
||||
# See https://github.com/solana-labs/solana/issues/5503
|
||||
_ cargo +"$rust_stable" clippy --version
|
||||
_ cargo +"$rust_stable" clippy --all --exclude solana-sdk-c --exclude solana-validator-cuda -- --deny=warnings
|
||||
_ cargo +"$rust_stable" clippy --all --exclude solana-sdk-c -- --deny=warnings
|
||||
_ cargo +"$rust_stable" clippy --manifest-path sdk-c/Cargo.toml -- --deny=warnings
|
||||
|
||||
_ cargo +"$rust_stable" audit --version
|
||||
|
@ -33,7 +33,7 @@ test-stable)
|
||||
echo "Executing $testName"
|
||||
|
||||
_ cargo +"$rust_stable" build --tests --bins ${V:+--verbose}
|
||||
_ cargo +"$rust_stable" test --all --exclude solana-local-cluster --exclude solana-validator-cuda ${V:+--verbose} -- --nocapture
|
||||
_ cargo +"$rust_stable" test --all --exclude solana-local-cluster ${V:+--verbose} -- --nocapture
|
||||
;;
|
||||
test-stable-perf)
|
||||
echo "Executing $testName"
|
||||
@ -61,8 +61,6 @@ test-stable-perf)
|
||||
--manifest-path programs/bpf/Cargo.toml \
|
||||
--no-default-features --features=bpf_c,bpf_rust
|
||||
|
||||
# Run root package tests with these features
|
||||
maybeCuda=
|
||||
if [[ $(uname) = Linux ]]; then
|
||||
# Enable persistence mode to keep the CUDA kernel driver loaded, avoiding a
|
||||
# lengthy and unexpected delay the first time CUDA is involved when the driver
|
||||
@ -71,19 +69,20 @@ test-stable-perf)
|
||||
|
||||
rm -rf target/perf-libs
|
||||
./fetch-perf-libs.sh
|
||||
# shellcheck source=/dev/null
|
||||
source ./target/perf-libs/env.sh
|
||||
maybeCuda=--features=cuda
|
||||
|
||||
# Force CUDA for solana-core unit tests
|
||||
export TEST_PERF_LIBS_CUDA=1
|
||||
|
||||
# Force CUDA in ci/localnet-sanity.sh
|
||||
export SOLANA_CUDA=1
|
||||
fi
|
||||
|
||||
# Run root package library tests
|
||||
_ cargo +"$rust_stable" build --tests --bins ${V:+--verbose}
|
||||
_ cargo +"$rust_stable" test --all --manifest-path=core/Cargo.toml ${V:+--verbose} $maybeCuda --exclude solana-local-cluster -- --nocapture
|
||||
_ cargo +"$rust_stable" build --bins ${V:+--verbose}
|
||||
_ cargo +"$rust_stable" test --package solana-core --lib ${V:+--verbose} -- --nocapture
|
||||
;;
|
||||
test-local-cluster)
|
||||
echo "Executing $testName"
|
||||
_ cargo +"$rust_stable" build --release --tests --bins ${V:+--verbose}
|
||||
_ cargo +"$rust_stable" build --release --bins ${V:+--verbose}
|
||||
_ cargo +"$rust_stable" test --release --package solana-local-cluster ${V:+--verbose} -- --nocapture
|
||||
exit 0
|
||||
;;
|
||||
|
@ -39,9 +39,9 @@ launchTestnet() {
|
||||
|
||||
echo --- start "$nodeCount" node test
|
||||
if [[ -n $USE_PREBUILT_CHANNEL_TARBALL ]]; then
|
||||
net/net.sh start -f "cuda" -o noValidatorSanity -t "$CHANNEL"
|
||||
net/net.sh start -o noValidatorSanity -t "$CHANNEL"
|
||||
else
|
||||
net/net.sh start -f "cuda" -o noValidatorSanity -T solana-release*.tar.bz2
|
||||
net/net.sh start -o noValidatorSanity -T solana-release*.tar.bz2
|
||||
fi
|
||||
|
||||
echo --- wait "$ITERATION_WAIT" seconds to complete test
|
||||
|
Reference in New Issue
Block a user