ci/test-stable-perf.sh now runs on macOS
This commit is contained in:
parent
951d6398a0
commit
becfd1e9fa
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Builds perf-libs from the upstream source and installs them into the correct
|
||||||
|
# location in the tree
|
||||||
|
#
|
||||||
|
set -e
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
|
if [[ -d target/perf-libs ]]; then
|
||||||
|
echo "target/perf-libs/ already exists, to continue run:"
|
||||||
|
echo "$ rm -rf target/perf-libs"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -x
|
||||||
|
git clone git@github.com:solana-labs/solana-perf-libs.git target/perf-libs
|
||||||
|
cd target/perf-libs
|
||||||
|
make -j"$(nproc)"
|
||||||
|
make DESTDIR=. install
|
18
build.rs
18
build.rs
|
@ -38,8 +38,22 @@ fn main() {
|
||||||
println!("cargo:rustc-link-lib=dylib=cudadevrt");
|
println!("cargo:rustc-link-lib=dylib=cudadevrt");
|
||||||
}
|
}
|
||||||
if erasure {
|
if erasure {
|
||||||
println!("cargo:rerun-if-changed=target/perf-libs/libgf_complete.so");
|
#[cfg(any(target_os = "macos", target_os = "ios"))]
|
||||||
println!("cargo:rerun-if-changed=target/perf-libs/libJerasure.so");
|
{
|
||||||
|
println!("cargo:rerun-if-changed=target/perf-libs/libgf_complete.dylib");
|
||||||
|
println!("cargo:rerun-if-changed=target/perf-libs/libJerasure.dylib");
|
||||||
|
}
|
||||||
|
#[cfg(all(unix, not(any(target_os = "macos", target_os = "ios"))))]
|
||||||
|
{
|
||||||
|
println!("cargo:rerun-if-changed=target/perf-libs/libgf_complete.so");
|
||||||
|
println!("cargo:rerun-if-changed=target/perf-libs/libJerasure.so");
|
||||||
|
}
|
||||||
|
#[cfg(windows)]
|
||||||
|
{
|
||||||
|
println!("cargo:rerun-if-changed=target/perf-libs/libgf_complete.dll");
|
||||||
|
println!("cargo:rerun-if-changed=target/perf-libs/libJerasure.dll");
|
||||||
|
}
|
||||||
|
|
||||||
println!("cargo:rustc-link-lib=dylib=Jerasure");
|
println!("cargo:rustc-link-lib=dylib=Jerasure");
|
||||||
println!("cargo:rustc-link-lib=dylib=gf_complete");
|
println!("cargo:rustc-link-lib=dylib=gf_complete");
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,10 +18,14 @@ ci/affects-files.sh \
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FEATURES=bpf_c,erasure,chacha
|
||||||
|
if [[ $(uname) = Darwin ]]; then
|
||||||
|
./build-perf-libs.sh
|
||||||
|
else
|
||||||
|
./fetch-perf-libs.sh
|
||||||
|
# shellcheck source=/dev/null
|
||||||
|
source ./target/perf-libs/env.sh
|
||||||
|
FEATURES=$FEATURES,cuda
|
||||||
|
fi
|
||||||
|
|
||||||
./fetch-perf-libs.sh
|
|
||||||
# shellcheck source=/dev/null
|
|
||||||
source ./target/perf-libs/env.sh
|
|
||||||
|
|
||||||
FEATURES=bpf_c,cuda,erasure,chacha
|
|
||||||
exec ci/test-stable.sh "$FEATURES"
|
exec ci/test-stable.sh "$FEATURES"
|
||||||
|
|
Loading…
Reference in New Issue