From 69f0a58ca2f707eafd2021a7b73e50db46da81f0 Mon Sep 17 00:00:00 2001 From: Calvin Kirs Date: Sun, 18 Jun 2023 20:01:51 +0800 Subject: [PATCH] [Improve](CI)Optimize workflow dependencies --- .asf.yaml | 1 + .github/workflows/auto_trigger_teamcity.yml | 6 ++++++ .github/workflows/be-ut-clang.yml | 4 ++++ .github/workflows/be-ut-mac.yml | 2 ++ .github/workflows/build-extension.yml | 2 ++ .github/workflows/build-thirdparty.yml | 4 +++- .github/workflows/checkstyle.yaml | 2 ++ .github/workflows/clang-format.yml | 3 +++ .github/workflows/code-checks.yml | 3 +++ 9 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.asf.yaml b/.asf.yaml index 80dd4aafb9774d..a79ee0b9b5f577 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -64,6 +64,7 @@ github: - Build Third Party Libraries (macOS) - COMPILE (DORIS_COMPILE) - Need_2_Approval + - Latest-Master-Code-Check required_pull_request_reviews: dismiss_stale_reviews: true diff --git a/.github/workflows/auto_trigger_teamcity.yml b/.github/workflows/auto_trigger_teamcity.yml index 9ffd5a8b9242ad..09b8425ac95faf 100644 --- a/.github/workflows/auto_trigger_teamcity.yml +++ b/.github/workflows/auto_trigger_teamcity.yml @@ -22,6 +22,12 @@ on: types: [created, edited] pull_request_review_comment: types: [created, edited] +needs: + - latest-code-check + - be-ut-clang + - be-ut-mac + - build-extension + - build-thirdparty env: PULL_REQUEST_NUM: $(echo "${{ github.event.issue.pull_request.url }}" | awk -F/ '{print $NF}') diff --git a/.github/workflows/be-ut-clang.yml b/.github/workflows/be-ut-clang.yml index 3ac273f3ca1924..e39408dee851a5 100644 --- a/.github/workflows/be-ut-clang.yml +++ b/.github/workflows/be-ut-clang.yml @@ -21,6 +21,10 @@ on: pull_request: schedule: - cron: '0 4,10,16,22 * * *' # schedule it periodically to share the cache +needs: + - latest-code-check + - checkstyle + concurrency: group: ${{ github.ref }} (BE UT Clang) diff --git a/.github/workflows/be-ut-mac.yml b/.github/workflows/be-ut-mac.yml index 19e99d27b4820b..23a6813225cb21 100644 --- a/.github/workflows/be-ut-mac.yml +++ b/.github/workflows/be-ut-mac.yml @@ -21,6 +21,8 @@ on: pull_request: schedule: - cron: '0 4,10,16,22 * * *' # schedule it periodically to share the cache +needs: + - latest-code-check concurrency: group: ${{ github.ref }} (BE UT macOS) diff --git a/.github/workflows/build-extension.yml b/.github/workflows/build-extension.yml index 4a9fc5d38ef2b6..e0921120b8d454 100644 --- a/.github/workflows/build-extension.yml +++ b/.github/workflows/build-extension.yml @@ -20,6 +20,8 @@ name: Build Extensions on: pull_request: +needs: + - latest-code-check concurrency: group: ${{ github.ref }} (Build Extensions) diff --git a/.github/workflows/build-thirdparty.yml b/.github/workflows/build-thirdparty.yml index 510643a3a9882e..3f287b507c1570 100644 --- a/.github/workflows/build-thirdparty.yml +++ b/.github/workflows/build-thirdparty.yml @@ -18,7 +18,9 @@ name: Build Third Party Libraries on: - pull_request: + pull_request: +needs: + - latest-code-check concurrency: group: ${{ github.ref }} (Build Third Party Libraries) diff --git a/.github/workflows/checkstyle.yaml b/.github/workflows/checkstyle.yaml index 13ab46b2cd50b2..d90d8a10dfaf74 100644 --- a/.github/workflows/checkstyle.yaml +++ b/.github/workflows/checkstyle.yaml @@ -20,6 +20,8 @@ name: FE Code Style Checker on: pull_request: +needs: + - latest-code-check jobs: java-checkstyle: diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index d676f171ca8b86..0016fd93f9af63 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -21,6 +21,9 @@ name: BE Code Formatter on: [push, pull_request] +needs: + - latest-code-check + jobs: clang-format: name: "Clang Formatter" diff --git a/.github/workflows/code-checks.yml b/.github/workflows/code-checks.yml index 8bb81404caac8c..08f4fb2929721f 100644 --- a/.github/workflows/code-checks.yml +++ b/.github/workflows/code-checks.yml @@ -19,6 +19,9 @@ name: Code Checks on: [push, pull_request_target] +needs: + - latest-code-check + jobs: shellcheck: name: ShellCheck