ci/test-stable-perf.sh now runs on macOS

This commit is contained in:
Michael Vines 2018-12-20 14:37:34 -08:00
parent 951d6398a0
commit becfd1e9fa
3 changed files with 44 additions and 7 deletions

19
build-perf-libs.sh Executable file
View File

@ -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

View File

@ -38,8 +38,22 @@ fn main() {
println!("cargo:rustc-link-lib=dylib=cudadevrt");
}
if erasure {
println!("cargo:rerun-if-changed=target/perf-libs/libgf_complete.so");
println!("cargo:rerun-if-changed=target/perf-libs/libJerasure.so");
#[cfg(any(target_os = "macos", target_os = "ios"))]
{
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=gf_complete");
}

View File

@ -18,10 +18,14 @@ ci/affects-files.sh \
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"