From 56cd1faeafeba56ca8de950b9afad637ef4cd32c Mon Sep 17 00:00:00 2001 From: Adonis Ling Date: Sat, 17 Dec 2022 16:54:58 +0800 Subject: [PATCH] [chore](github) BE UT workflows support branch checks (#15146) Apache Doris made the branch branch-1.2-lts protected. As a result, all pull requests for this branch should be checked before merging it. However, the BE UT workflows doesn't support branch checks and they fail to check the pull requests for the branch branch-1.2-lts. The reason is that they download the wrong pre-built third-party libraries when they check the pull requests for branch-1.2-lts. --- .github/workflows/be-ut-clang.yml | 10 ++++++++-- .github/workflows/be-ut-mac.yml | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/be-ut-clang.yml b/.github/workflows/be-ut-clang.yml index d6361f98fb..5903b9987f 100644 --- a/.github/workflows/be-ut-clang.yml +++ b/.github/workflows/be-ut-clang.yml @@ -75,8 +75,14 @@ jobs: sudo dpkg-reconfigure --frontend noninteractive tzdata pushd thirdparty - curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-prebuilt-linux-x86_64.tar.xz \ - -o doris-thirdparty-prebuilt-linux-x86_64.tar.xz + branch="${{ github.base_ref }}" + if [[ -z "${branch}" ]] || [[ "${branch}" == 'master' ]]; then + curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-prebuilt-linux-x86_64.tar.xz \ + -o doris-thirdparty-prebuilt-linux-x86_64.tar.xz + else + curl -L "https://github.com/apache/doris-thirdparty/releases/download/automation-${branch/branch-/}/doris-thirdparty-prebuilt-linux-x86_64.tar.xz" \ + -o doris-thirdparty-prebuilt-linux-x86_64.tar.xz + fi tar -xvf doris-thirdparty-prebuilt-linux-x86_64.tar.xz popd diff --git a/.github/workflows/be-ut-mac.yml b/.github/workflows/be-ut-mac.yml index e0e939f633..3307ec11b8 100644 --- a/.github/workflows/be-ut-mac.yml +++ b/.github/workflows/be-ut-mac.yml @@ -83,8 +83,14 @@ jobs: brew install "${cellars[@]}" pushd thirdparty - curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-prebuilt-darwin-x86_64.tar.xz \ - -o doris-thirdparty-prebuilt-darwin-x86_64.tar.xz + branch="${{ github.base_ref }}" + if [[ -z "${branch}" ]] || [[ "${branch}" == 'master' ]]; then + curl -L https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-prebuilt-darwin-x86_64.tar.xz \ + -o doris-thirdparty-prebuilt-darwin-x86_64.tar.xz + else + curl -L "https://github.com/apache/doris-thirdparty/releases/download/automation-${branch/branch-/}/doris-thirdparty-prebuilt-darwin-x86_64.tar.xz" \ + -o doris-thirdparty-prebuilt-darwin-x86_64.tar.xz + fi tar -xvf doris-thirdparty-prebuilt-darwin-x86_64.tar.xz popd