Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Pull BPF enabled rustc and sysroot into SDK #2936

Merged
merged 2 commits into from
Feb 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ci/test-stable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ test-stable-perf)
Cargo.toml$ \
ci/test-stable-perf.sh \
ci/test-stable.sh \
^programs/ \
^sdk/ \
|| {
annotate --style info \
"Skipped tests as no relavant files were modified"
"Skipped test-stable-perf as no relavant files were modified"
exit 0
}

Expand Down
2 changes: 2 additions & 0 deletions sdk/bpf/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/criterion*
/llvm-native*
/rust-sysroot*
/rust-toolchain*
50 changes: 50 additions & 0 deletions sdk/bpf/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,54 @@ if [[ ! -f llvm-native-$machine-$version.md ]]; then
fi
fi

# Install Rust-BPF
version=v0.0.1
if [[ ! -f rust-bpf-$machine-$version.md ]]; then
(
filename=solana-rust-bpf-$machine.tar.bz2

set -ex
rm -rf rust-bpf*
mkdir -p rust-bpf
cd rust-bpf
wget --progress=dot:giga https://github.com/solana-labs/rust-bpf-builder/releases/download/$version/$filename
tar -jxf $filename
rm -rf $filename

echo "https://github.com/solana-labs/rust-bpf-builder/releases/tag/$version" > ../rust-bpf-$machine-$version.md
)
exitcode=$?
if [[ $exitcode -ne 0 ]]; then
rm -rf rust-bpf
exit 1
fi
set +e
rustup toolchain uninstall bpf
set -e
rustup toolchain link bpf rust-bpf
fi

# Install Rust-BPF Sysroot
version=v0.0.1
if [[ ! -f rust-bpf-sysroot-$version.md ]]; then
(
filename=solana-rust-bpf-sysroot.tar.bz2

set -ex
rm -rf rust-bpf-sysroot*
mkdir -p rust-bpf-sysroot
cd rust-bpf-sysroot
wget --progress=dot:giga https://github.com/solana-labs/rust-bpf-sysroot/releases/download/$version/$filename
tar -jxf $filename
rm -rf $filename

echo "https://github.com/solana-labs/rust-bpf-sysroot/releases/tag/$version" > ../rust-bpf-sysroot-$version.md
)
exitcode=$?
if [[ $exitcode -ne 0 ]]; then
rm -rf rust-bpf-sysroot
exit 1
fi
fi

exit 0