From b70d730b32024eba759adfdff6e20e24e3f36d1c Mon Sep 17 00:00:00 2001 From: Grimes Date: Mon, 28 May 2018 13:05:16 -0700 Subject: [PATCH] Support local .a, skip if unable to find .a --- ci/test-cuda.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ci/test-cuda.sh b/ci/test-cuda.sh index 236f4fb0b5..ef92733786 100755 --- a/ci/test-cuda.sh +++ b/ci/test-cuda.sh @@ -2,11 +2,17 @@ cd "$(dirname "$0")/.." -: "${libcuda_verify_ed25519_URL:?environment variable undefined}" +LIB=libcuda_verify_ed25519.a +if [[ ! -r $LIB ]]; then + if [[ -z "${libcuda_verify_ed25519_URL:-}" ]]; then + echo "$0 skipped. Unable to locate $LIB" + exit 0 + fi -export LD_LIBRARY_PATH=/usr/local/cuda/lib64 -export PATH=$PATH:/usr/local/cuda/bin -curl -X GET -o libcuda_verify_ed25519.a "$libcuda_verify_ed25519_URL" + export LD_LIBRARY_PATH=/usr/local/cuda/lib64 + export PATH=$PATH:/usr/local/cuda/bin + curl -X GET -o $LIB "$libcuda_verify_ed25519_URL" +fi # shellcheck disable=SC1090 # <-- shellcheck can't follow ~ source ~/.cargo/env