2018-11-11 08:19:04 -08:00
|
|
|
#!/usr/bin/env bash
|
2019-06-17 14:31:41 -07:00
|
|
|
|
2019-06-27 00:32:32 -07:00
|
|
|
PERF_LIBS_VERSION=v0.15.0
|
2019-09-26 13:36:51 -07:00
|
|
|
VERSION=$PERF_LIBS_VERSION-1
|
2019-06-17 14:31:41 -07:00
|
|
|
|
2018-11-11 08:19:04 -08:00
|
|
|
set -e
|
2019-05-24 09:28:52 -07:00
|
|
|
cd "$(dirname "$0")"
|
2018-06-20 15:11:59 -07:00
|
|
|
|
2019-09-26 13:36:51 -07:00
|
|
|
if [[ ! -f target/perf-libs/.$VERSION ]]; then
|
2019-05-24 09:28:52 -07:00
|
|
|
if [[ $(uname) != Linux ]]; then
|
2019-09-26 13:36:51 -07:00
|
|
|
echo Note: Performance libraries are only available for Linux
|
|
|
|
exit 0
|
2019-05-24 09:28:52 -07:00
|
|
|
fi
|
2018-06-20 15:11:59 -07:00
|
|
|
|
2019-05-24 09:28:52 -07:00
|
|
|
if [[ $(uname -m) != x86_64 ]]; then
|
2019-09-26 13:36:51 -07:00
|
|
|
echo Note: Performance libraries are only available for x86_64 architecture
|
|
|
|
exit 0
|
2019-05-24 09:28:52 -07:00
|
|
|
fi
|
2018-06-20 15:11:59 -07:00
|
|
|
|
2019-05-24 09:28:52 -07:00
|
|
|
mkdir -p target/perf-libs
|
2018-08-16 18:49:23 -07:00
|
|
|
(
|
|
|
|
set -x
|
2019-05-24 18:06:38 -07:00
|
|
|
cd target/perf-libs
|
2019-06-18 08:24:41 -07:00
|
|
|
curl -L --retry 5 --retry-delay 2 --retry-connrefused -o solana-perf.tgz \
|
|
|
|
https://github.com/solana-labs/solana-perf-libs/releases/download/$PERF_LIBS_VERSION/solana-perf.tgz
|
|
|
|
tar zxvf solana-perf.tgz
|
|
|
|
rm -f solana-perf.tgz
|
2019-09-26 13:36:51 -07:00
|
|
|
touch .$VERSION
|
2018-08-16 18:49:23 -07:00
|
|
|
)
|
2018-11-12 17:50:16 -08:00
|
|
|
|
2019-09-26 13:36:51 -07:00
|
|
|
# Setup symlinks so the perf-libs/ can be found from all binaries run out of
|
|
|
|
# target/
|
|
|
|
for dir in target/{debug,release}/{,deps/}; do
|
|
|
|
mkdir -p $dir
|
|
|
|
ln -sfT ../perf-libs ${dir}perf-libs
|
|
|
|
done
|
2019-06-19 08:29:56 -07:00
|
|
|
|
|
|
|
fi
|
|
|
|
|
2019-06-18 21:17:20 -07:00
|
|
|
exit 0
|