This is an automated email from the ASF dual-hosted git repository.
shuke987 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 7a10e10b5dc [chore](build) Share PR path detection for UI, CDC and
third-party builds (#71225)
7a10e10b5dc is described below
commit 7a10e10b5dc2a5dfb0f51c3c67bfc4c8c3f009e0
Author: shuke <[email protected]>
AuthorDate: Tue Dec 1 17:29:29 2026 +0800
[chore](build) Share PR path detection for UI, CDC and third-party builds
(#71225)
Doris PRs can trigger the FE web UI build, CDC client build and tests,
or third-party checks. Each workflow used a separate Ubuntu job and
recursively checked out the repository and its submodules to decide
whether it had work.
---
.github/workflows/build-extension.yml | 31 ++-------------
.github/workflows/build-thirdparty.yml | 69 +++++++++++++++++++++++-----------
.github/workflows/build-ui.yml | 6 ++-
3 files changed, 55 insertions(+), 51 deletions(-)
diff --git a/.github/workflows/build-extension.yml
b/.github/workflows/build-extension.yml
index 66d39c0549a..d0c8ae5a4ca 100644
--- a/.github/workflows/build-extension.yml
+++ b/.github/workflows/build-extension.yml
@@ -19,40 +19,16 @@
name: Build Extensions
on:
- pull_request:
+ workflow_call:
workflow_dispatch:
concurrency:
group: ${{ github.ref }} (Build Extensions)
cancel-in-progress: true
jobs:
- changes:
- name: Detect Changes
- runs-on: ubuntu-latest
- if: github.event_name == 'pull_request'
- outputs:
- docs_changes: ${{ steps.filter.outputs.docs_changes }}
- cdc_client_changes: ${{ steps.filter.outputs.cdc_client_changes }}
- steps:
- - name: Checkout ${{ github.ref }}
- uses: actions/checkout@v3
- with:
- persist-credentials: false
- submodules: recursive
-
- - name: Paths filter
- uses: ./.github/actions/paths-filter
- id: filter
- with:
- filters: |
- docs_changes:
- - 'docs/**'
- cdc_client_changes:
- - 'fs_brokers/cdc_client/**'
build-cdc-client:
name: Build Cdc Client
- needs: changes
- if: ${{ needs.changes.outputs.cdc_client_changes == 'true' }}
+ if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ github.ref }}
@@ -86,8 +62,7 @@ jobs:
cd fs_brokers/cdc_client/ && /bin/bash build.sh
test-cdc-client:
name: Test Cdc Client
- needs: changes
- if: ${{ needs.changes.outputs.cdc_client_changes == 'true' }}
+ if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ github.ref }}
diff --git a/.github/workflows/build-thirdparty.yml
b/.github/workflows/build-thirdparty.yml
index 150236da270..437dc1349f1 100644
--- a/.github/workflows/build-thirdparty.yml
+++ b/.github/workflows/build-thirdparty.yml
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-name: Build Third Party Libraries
+name: UI, CDC and Thirdparty Builds
on:
pull_request:
@@ -27,31 +27,58 @@ concurrency:
jobs:
changes:
- name: Detect Changes
+ name: Detect component build paths
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
+ permissions:
+ contents: read
+ # If the comparison is unavailable, run every build whose result is
unknown.
outputs:
- thirdparty_changes: ${{ steps.filter.outputs.thirdparty_changes }}
- focused_test_changes: ${{ steps.filter.outputs.focused_test_changes }}
+ ui_changes: ${{ steps.filter.outputs.ui_changes != 'false' }}
+ cdc_client_changes: ${{ steps.filter.outputs.cdc_client_changes !=
'false' }}
+ thirdparty_changes: ${{ steps.filter.outputs.thirdparty_changes !=
'false' }}
+ focused_test_changes: ${{ steps.filter.outputs.focused_test_changes !=
'false' }}
steps:
- - name: Checkout ${{ github.ref }}
- uses: actions/checkout@v4
- with:
- persist-credentials: false
- submodules: recursive
-
- - name: Paths filter
- uses: ./.github/actions/paths-filter
+ - name: Detect changed paths
id: filter
- with:
- filters: |
- thirdparty_changes:
- - 'thirdparty/**'
- - 'env.sh'
- focused_test_changes:
- - 'regression-test/pipeline/external/conf/fe.conf'
- - 'thirdparty/test/adbc-jni-config-test.sh'
- - '.github/workflows/build-thirdparty.yml'
+ continue-on-error: true
+ env:
+ GH_TOKEN: ${{ github.token }}
+ BASE_SHA: ${{ github.event.pull_request.base.sha }}
+ HEAD_SHA: ${{ github.event.pull_request.head.sha }}
+ run: |
+ # Compare the PR snapshot even if a newer commit arrives while this
run is queued.
+ merge_base=$(gh api
"repos/$GITHUB_REPOSITORY/compare/$BASE_SHA...$HEAD_SHA?per_page=1" --jq
'.merge_base_commit.sha')
+ git init --bare --quiet
+ git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
+ gh auth setup-git
+ git fetch --quiet --no-tags --depth=1 --filter=blob:none origin
"$merge_base" "$HEAD_SHA"
+
+ changed() {
+ local output=$1
+ shift
+ git diff --no-renames --name-only "$merge_base" "$HEAD_SHA" --
"$@" > "$RUNNER_TEMP/changed-paths"
+ if [[ -s "$RUNNER_TEMP/changed-paths" ]]; then
+ echo "$output=true" >> "$GITHUB_OUTPUT"
+ else
+ echo "$output=false" >> "$GITHUB_OUTPUT"
+ fi
+ }
+ changed ui_changes ui/ .github/workflows/build-ui.yml
+ changed cdc_client_changes fs_brokers/cdc_client/
+ changed thirdparty_changes thirdparty/ env.sh
+ changed focused_test_changes
regression-test/pipeline/external/conf/fe.conf \
+ thirdparty/test/adbc-jni-config-test.sh
.github/workflows/build-thirdparty.yml
+
+ ui:
+ needs: changes
+ if: needs.changes.outputs.ui_changes == 'true'
+ uses: ./.github/workflows/build-ui.yml
+
+ cdc:
+ needs: changes
+ if: needs.changes.outputs.cdc_client_changes == 'true'
+ uses: ./.github/workflows/build-extension.yml
script_test:
name: Thirdparty Script Test
diff --git a/.github/workflows/build-ui.yml b/.github/workflows/build-ui.yml
index 7cae877ad99..ab4a044f0ef 100644
--- a/.github/workflows/build-ui.yml
+++ b/.github/workflows/build-ui.yml
@@ -19,7 +19,7 @@
name: FE Web UI
on:
- pull_request:
+ workflow_call:
workflow_dispatch:
concurrency:
group: ${{ github.ref }} (FE Web UI)
@@ -28,6 +28,7 @@ concurrency:
jobs:
changes:
name: Detect Changes
+ if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
outputs:
ui_changes: ${{ steps.filter.outputs.ui_changes }}
@@ -50,7 +51,8 @@ jobs:
build-ui:
name: Lint, Typecheck, Test and Build
needs: changes
- if: ${{ needs.changes.outputs.ui_changes == 'true' }}
+ # The PR caller has already checked UI paths. Manual runs use the local
comparison.
+ if: ${{ !cancelled() && (github.event_name == 'pull_request' ||
needs.changes.outputs.ui_changes == 'true') }}
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ github.ref }}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]