From 88807a59a43f3834857d4782b305f71966c93888 Mon Sep 17 00:00:00 2001 From: Colin Patrick McCabe Date: Tue, 30 Sep 2025 11:54:43 -0700 Subject: [PATCH] fix: have CI download from ci-support-binaries (#2692) Have CI download from ci-support-binaries to fix the build. --- ci/run_with_test_connection.sh | 59 ++++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/ci/run_with_test_connection.sh b/ci/run_with_test_connection.sh index 8d54c423..b0cf68a7 100755 --- a/ci/run_with_test_connection.sh +++ b/ci/run_with_test_connection.sh @@ -16,29 +16,46 @@ check_command_exists() { } if [[ ! -e ./lancedb ]]; then - ARCH="x64" - if [[ $OSTYPE == 'darwin'* ]]; then - UNAME=$(uname -m) - if [[ $UNAME == 'arm64' ]]; then - ARCH='arm64' - fi - OSTYPE="macos" - elif [[ $OSTYPE == 'linux'* ]]; then - if [[ $UNAME == 'aarch64' ]]; then - ARCH='arm64' - fi - OSTYPE="linux" + if [[ -v SOPHON_READ_TOKEN ]]; then + INPUT="lancedb-linux-x64" + gh release \ + --repo lancedb/lancedb \ + download ci-support-binaries \ + --pattern "${INPUT}" \ + || die "failed to fetch cli." + check_command_exists openssl + openssl enc -aes-256-cbc \ + -d -pbkdf2 \ + -pass "env:SOPHON_READ_TOKEN" \ + -in "${INPUT}" \ + -out ./lancedb-linux-x64.tar.gz \ + || die "openssl failed" + TARGET="${INPUT}.tar.gz" else - die "unknown OSTYPE: $OSTYPE" - fi + ARCH="x64" + if [[ $OSTYPE == 'darwin'* ]]; then + UNAME=$(uname -m) + if [[ $UNAME == 'arm64' ]]; then + ARCH='arm64' + fi + OSTYPE="macos" + elif [[ $OSTYPE == 'linux'* ]]; then + if [[ $UNAME == 'aarch64' ]]; then + ARCH='arm64' + fi + OSTYPE="linux" + else + die "unknown OSTYPE: $OSTYPE" + fi - check_command_exists gh - TARGET="lancedb-${OSTYPE}-${ARCH}.tar.gz" - gh release \ - --repo lancedb/sophon \ - download lancedb-cli-v0.0.3 \ - --pattern "${TARGET}" \ - || die "failed to fetch cli." + check_command_exists gh + TARGET="lancedb-${OSTYPE}-${ARCH}.tar.gz" + gh release \ + --repo lancedb/sophon \ + download lancedb-cli-v0.0.3 \ + --pattern "${TARGET}" \ + || die "failed to fetch cli." + fi check_command_exists tar tar xvf "${TARGET}" || die "tar failed."