mirror of
https://github.com/masonr/yet-another-bench-script.git
synced 2026-10-04 20:46:38 +00:00
pull fio/iperf3 binaries from github releases instead of repo
This commit is contained in:
+17
-8
@@ -8,14 +8,16 @@ set -x
|
||||
|
||||
# remove obsolete CentOS repos
|
||||
cd /etc/yum.repos.d/
|
||||
rm CentOS-Base.repo CentOS-SCLo-scl-rh.repo CentOS-SCLo-scl.repo CentOS-fasttrack.repo CentOS-x86_64-kernel.repo
|
||||
rm -f CentOS-Base.repo CentOS-SCLo-scl-rh.repo CentOS-SCLo-scl.repo CentOS-fasttrack.repo CentOS-x86_64-kernel.repo
|
||||
|
||||
yum install -y yum-plugin-ovl # fix for docker overlay fs
|
||||
yum install -y xz
|
||||
|
||||
# download musl cross compilation toolchain
|
||||
# download musl cross compilation toolchain - mirrored as a release asset on the
|
||||
# repo since musl.cc blocks GitHub Actions IP ranges (musl.cc fallback kept)
|
||||
cd ~
|
||||
curl -L "https://musl.cc/${CROSS}-cross.tgz" -o "${CROSS}-cross.tgz"
|
||||
curl -fL -4 --retry 5 --retry-delay 2 --connect-timeout 15 "https://github.com/masonr/yet-another-bench-script/releases/download/toolchains/${CROSS}-cross.tgz" -o "${CROSS}-cross.tgz" \
|
||||
|| curl -fL -4 --retry 5 --retry-delay 2 --connect-timeout 15 "https://musl.cc/${CROSS}-cross.tgz" -o "${CROSS}-cross.tgz"
|
||||
tar xf "${CROSS}-cross.tgz"
|
||||
|
||||
# download, compile, and install libaio as static library
|
||||
@@ -30,11 +32,15 @@ source /hbb_exe/activate
|
||||
|
||||
# download and compile fio
|
||||
cd ~
|
||||
curl -L https://github.com/axboe/fio/archive/fio-3.39.tar.gz -o "fio.tar.gz"
|
||||
curl -L https://github.com/axboe/fio/archive/fio-3.42.tar.gz -o "fio.tar.gz"
|
||||
tar xf fio.tar.gz
|
||||
cd fio-fio*
|
||||
cd fio-fio-*
|
||||
# fio >= 3.42 includes both linux/prctl.h and sys/prctl.h in backend.c, which
|
||||
# conflicts under musl; sys/prctl.h alone is sufficient
|
||||
sed -i '/#include <linux\/prctl.h>/d' backend.c
|
||||
CC=/root/${CROSS}-cross/bin/${CROSS}-gcc ./configure --disable-native --build-static
|
||||
make
|
||||
# link against libatomic for 32-bit/ARM targets that lack native 64-bit atomics
|
||||
make EXTLIBS+=' -latomic'
|
||||
|
||||
# verify no external shared library links
|
||||
libcheck fio
|
||||
@@ -43,10 +49,13 @@ cp fio "/io/fio_$ARCH"
|
||||
|
||||
# download and compile iperf
|
||||
cd ~
|
||||
curl -L https://github.com/esnet/iperf/archive/3.18.tar.gz -o "iperf.tar.gz"
|
||||
curl -L https://github.com/esnet/iperf/archive/3.21.tar.gz -o "iperf.tar.gz"
|
||||
tar xf iperf.tar.gz
|
||||
cd iperf*
|
||||
cd iperf-*
|
||||
CC=/root/${CROSS}-cross/bin/${CROSS}-gcc ./configure --disable-shared --disable-profiling --build x86_64-pc-linux-gnu --host "${HOST}" --with-openssl=no --enable-static-bin
|
||||
# remove libatomic.la so libtool links the static libatomic.a rather than
|
||||
# attempting to link libatomic.so into the static binary (breaks arm32 builds)
|
||||
rm -f "/root/${CROSS}-cross/${CROSS}/lib/libatomic.la"
|
||||
make
|
||||
|
||||
# verify no external shared library links
|
||||
|
||||
Reference in New Issue
Block a user