From 21e1d9ad785e0d270bda4006b0710d6a1cd84968 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Fri, 29 Nov 2024 18:46:25 +0800 Subject: [PATCH] chore(ci): install bendsql from packages (#16970) --- .github/actions/setup_bendsql/action.yml | 25 ++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/actions/setup_bendsql/action.yml b/.github/actions/setup_bendsql/action.yml index 6a643ded14ca..488e3abd3b15 100644 --- a/.github/actions/setup_bendsql/action.yml +++ b/.github/actions/setup_bendsql/action.yml @@ -3,25 +3,34 @@ description: "Setup BendSQL for CI" runs: using: "composite" steps: - - name: Download and Install for Linux + - name: Install for Linux if: runner.os == 'Linux' shell: bash run: | if bendsql --version; then exit 0 fi - curl --retry 5 -Lo /tmp/bendsql.tar.gz https://github.com/databendlabs/bendsql/releases/download/v0.23.2/bendsql-x86_64-unknown-linux-gnu.tar.gz - tar -xzf /tmp/bendsql.tar.gz -C /tmp - mv /tmp/bendsql /usr/local/bin/bendsql + case $RUNNER_PROVIDER in + aws) + aws s3 cp s3://databend-ci/packages/bendsql_$(dpkg --print-architecture).deb /tmp/bendsql.deb + sudo dpkg -i /tmp/bendsql.deb + ;; + gcp) + gsutil cp gs://databend-ci/packages/bendsql_$(dpkg --print-architecture).deb /tmp/bendsql.deb + sudo dpkg -i /tmp/bendsql.deb + ;; + *) + curl -fsSL https://repo.databend.com/install/bendsql.sh | bash -s -- -y --prefix /usr/local + ;; + esac bendsql --version - - name: Download and Install for macOS + + - name: Install for macOS if: runner.os == 'macOS' shell: bash run: | if bendsql --version; then exit 0 fi - curl --retry 5 -Lo /tmp/bendsql.tar.gz https://github.com/databendlabs/bendsql/releases/download/v0.23.2/bendsql-x86_64-apple-darwin.tar.gz - tar -xzf /tmp/bendsql.tar.gz -C /tmp - mv /tmp/bendsql /usr/local/bin/bendsql + brew install databendcloud/homebrew-tap/bendsql bendsql --version