Add --use-move flag to cargo-install-all.sh and net/net.sh (#6670)
This commit is contained in:
parent
2d67962c2f
commit
e6c8bfd008
|
@ -68,7 +68,7 @@ echo --- Creating tarball
|
||||||
) > solana-release/version.yml
|
) > solana-release/version.yml
|
||||||
|
|
||||||
source ci/rust-version.sh stable
|
source ci/rust-version.sh stable
|
||||||
scripts/cargo-install-all.sh +"$rust_stable" solana-release
|
scripts/cargo-install-all.sh +"$rust_stable" --use-move solana-release
|
||||||
|
|
||||||
# Reduce the Windows archive size until
|
# Reduce the Windows archive size until
|
||||||
# https://github.com/appveyor/ci/issues/2997 is fixed
|
# https://github.com/appveyor/ci/issues/2997 is fixed
|
||||||
|
|
|
@ -86,6 +86,8 @@ Operate a configured testnet
|
||||||
--deploy-if-newer - Only deploy if newer software is
|
--deploy-if-newer - Only deploy if newer software is
|
||||||
available (requires -t or -T)
|
available (requires -t or -T)
|
||||||
|
|
||||||
|
--use-move - Build the move-loader-program and add it to the cluster
|
||||||
|
|
||||||
sanity/start-specific options:
|
sanity/start-specific options:
|
||||||
-F - Discard validator nodes that didn't bootup successfully
|
-F - Discard validator nodes that didn't bootup successfully
|
||||||
-o noInstallCheck - Skip solana-install sanity
|
-o noInstallCheck - Skip solana-install sanity
|
||||||
|
@ -138,6 +140,7 @@ maybeDisableAirdrops=""
|
||||||
debugBuild=false
|
debugBuild=false
|
||||||
doBuild=true
|
doBuild=true
|
||||||
gpuMode=auto
|
gpuMode=auto
|
||||||
|
maybeUseMove=""
|
||||||
|
|
||||||
command=$1
|
command=$1
|
||||||
[[ -n $command ]] || usage
|
[[ -n $command ]] || usage
|
||||||
|
@ -198,6 +201,9 @@ while [[ -n $1 ]]; do
|
||||||
elif [[ $1 = --debug ]]; then
|
elif [[ $1 = --debug ]]; then
|
||||||
debugBuild=true
|
debugBuild=true
|
||||||
shift 1
|
shift 1
|
||||||
|
elif [[ $1 = --use-move ]]; then
|
||||||
|
maybeUseMove=$1
|
||||||
|
shift 1
|
||||||
elif [[ $1 = --gpu-mode ]]; then
|
elif [[ $1 = --gpu-mode ]]; then
|
||||||
gpuMode=$2
|
gpuMode=$2
|
||||||
case "$gpuMode" in
|
case "$gpuMode" in
|
||||||
|
@ -367,7 +373,7 @@ build() {
|
||||||
|
|
||||||
$MAYBE_DOCKER bash -c "
|
$MAYBE_DOCKER bash -c "
|
||||||
set -ex
|
set -ex
|
||||||
scripts/cargo-install-all.sh farf \"$buildVariant\"
|
scripts/cargo-install-all.sh farf \"$buildVariant\" \"$maybeUseMove\"
|
||||||
if [[ -n \"$customPrograms\" ]]; then
|
if [[ -n \"$customPrograms\" ]]; then
|
||||||
scripts/cargo-install-custom-programs.sh farf $customPrograms
|
scripts/cargo-install-custom-programs.sh farf $customPrograms
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -4,27 +4,52 @@
|
||||||
# other workspace crates or native program crates.
|
# other workspace crates or native program crates.
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
export rust_version=
|
usage() {
|
||||||
if [[ $1 =~ \+ ]]; then
|
exitcode=0
|
||||||
export rust_version=$1
|
if [[ -n "$1" ]]; then
|
||||||
shift
|
exitcode=1
|
||||||
fi
|
echo "Error: $*"
|
||||||
|
fi
|
||||||
|
cat <<EOF
|
||||||
|
usage: $0 [+<cargo version>] [--use-move] [--debug] <install directory>
|
||||||
|
EOF
|
||||||
|
exit $exitcode
|
||||||
|
}
|
||||||
|
|
||||||
if [[ -z $1 ]]; then
|
maybeRustVersion=
|
||||||
echo Install directory not specified
|
useMove=false
|
||||||
|
installDir=
|
||||||
|
buildVariant=release
|
||||||
|
maybeReleaseFlag=--release
|
||||||
|
|
||||||
|
while [[ -n $1 ]]; do
|
||||||
|
if [[ ${1:0:1} = - ]]; then
|
||||||
|
if [[ $1 = --use-move ]]; then
|
||||||
|
useMove=true
|
||||||
|
shift
|
||||||
|
elif [[ $1 = --debug ]]; then
|
||||||
|
maybeReleaseFlag=
|
||||||
|
buildVariant=debug
|
||||||
|
shift
|
||||||
|
else
|
||||||
|
usage "Unknown option: $1"
|
||||||
|
fi
|
||||||
|
elif [[ ${1:0:1} = \+ ]]; then
|
||||||
|
maybeRustVersion=$1
|
||||||
|
shift
|
||||||
|
else
|
||||||
|
installDir=$1
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ -z "$installDir" ]]; then
|
||||||
|
usage "Install directory not specified"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
installDir="$(mkdir -p "$1"; cd "$1"; pwd)"
|
installDir="$(mkdir -p "$installDir"; cd "$installDir"; pwd)"
|
||||||
cargo=cargo
|
cargo=cargo
|
||||||
debugBuild="$2"
|
|
||||||
|
|
||||||
buildVariant=release
|
|
||||||
maybeReleaseFlag=--release
|
|
||||||
if [[ -n "$debugBuild" ]]; then
|
|
||||||
maybeReleaseFlag=
|
|
||||||
buildVariant=debug
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Install location: $installDir ($buildVariant)"
|
echo "Install location: $installDir ($buildVariant)"
|
||||||
|
|
||||||
|
@ -36,10 +61,12 @@ SECONDS=0
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
# shellcheck disable=SC2086 # Don't want to double quote $rust_version
|
# shellcheck disable=SC2086 # Don't want to double quote $rust_version
|
||||||
$cargo $rust_version build $maybeReleaseFlag
|
$cargo $maybeRustVersion build $maybeReleaseFlag
|
||||||
|
|
||||||
|
if $useMove; then
|
||||||
# shellcheck disable=SC2086 # Don't want to double quote $rust_version
|
# shellcheck disable=SC2086 # Don't want to double quote $rust_version
|
||||||
$cargo $rust_version build $maybeReleaseFlag --manifest-path programs/move_loader_program/Cargo.toml
|
$cargo $maybeRustVersion build $maybeReleaseFlag --manifest-path programs/move_loader_program/Cargo.toml
|
||||||
|
fi
|
||||||
)
|
)
|
||||||
|
|
||||||
BINS=(
|
BINS=(
|
||||||
|
@ -69,7 +96,7 @@ done
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
# shellcheck disable=SC2086 # Don't want to double quote $rust_version
|
# shellcheck disable=SC2086 # Don't want to double quote $rust_version
|
||||||
$cargo $rust_version build $maybeReleaseFlag "${binArgs[@]}"
|
$cargo $maybeRustVersion build $maybeReleaseFlag "${binArgs[@]}"
|
||||||
)
|
)
|
||||||
|
|
||||||
mkdir -p "$installDir/bin"
|
mkdir -p "$installDir/bin"
|
||||||
|
|
|
@ -14,7 +14,7 @@ fi
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
rm -rf usr/
|
rm -rf usr/
|
||||||
../../ci/docker-run.sh "$rust_stable_docker_image" \
|
../../ci/docker-run.sh "$rust_stable_docker_image" \
|
||||||
scripts/cargo-install-all.sh sdk/docker-solana/usr
|
scripts/cargo-install-all.sh --use-move sdk/docker-solana/usr
|
||||||
|
|
||||||
cp -f ../../run.sh usr/bin/solana-run.sh
|
cp -f ../../run.sh usr/bin/solana-run.sh
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue