Only install rust-bpf if rust-bpf version changes (#2939)
This commit is contained in:
parent
454c66f988
commit
6a61f25735
|
@ -61,24 +61,30 @@ if [[ ! -f rust-bpf-$machine-$version.md ]]; then
|
||||||
filename=solana-rust-bpf-$machine.tar.bz2
|
filename=solana-rust-bpf-$machine.tar.bz2
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
rm -rf rust-bpf*
|
rm -rf rust-bpf
|
||||||
|
rm -rf rust-bpf-$machine-*
|
||||||
mkdir -p rust-bpf
|
mkdir -p rust-bpf
|
||||||
cd rust-bpf
|
pushd rust-bpf
|
||||||
wget --progress=dot:giga https://github.com/solana-labs/rust-bpf-builder/releases/download/$version/$filename
|
wget --progress=dot:giga https://github.com/solana-labs/rust-bpf-builder/releases/download/$version/$filename
|
||||||
tar -jxf $filename
|
tar -jxf $filename
|
||||||
rm -rf $filename
|
rm -rf $filename
|
||||||
|
popd
|
||||||
|
|
||||||
echo "https://github.com/solana-labs/rust-bpf-builder/releases/tag/$version" > ../rust-bpf-$machine-$version.md
|
set -ex
|
||||||
|
./rust-bpf/bin/rustc --print sysroot
|
||||||
|
|
||||||
|
set +e
|
||||||
|
rustup toolchain uninstall bpf
|
||||||
|
set -e
|
||||||
|
rustup toolchain link bpf rust-bpf
|
||||||
|
|
||||||
|
echo "https://github.com/solana-labs/rust-bpf-builder/releases/tag/$version" > rust-bpf-$machine-$version.md
|
||||||
)
|
)
|
||||||
exitcode=$?
|
exitcode=$?
|
||||||
if [[ $exitcode -ne 0 ]]; then
|
if [[ $exitcode -ne 0 ]]; then
|
||||||
rm -rf rust-bpf
|
rm -rf rust-bpf
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
set +e
|
|
||||||
rustup toolchain uninstall bpf
|
|
||||||
set -e
|
|
||||||
rustup toolchain link bpf rust-bpf
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install Rust-BPF Sysroot
|
# Install Rust-BPF Sysroot
|
||||||
|
|
Loading…
Reference in New Issue