[chore](github) Optimize BE UT workflows (#14565)
In #14533 , we run BE UT workflows periodically to share the cache with brand new pull requests. However, we don't need to save the cache when the unit tests doesn't run, otherwise it may occupy huge cache space and some useful caches will be evicted by GitHub.
This commit is contained in:
23
.github/workflows/be-ut-clang.yml
vendored
23
.github/workflows/be-ut-clang.yml
vendored
@ -37,14 +37,8 @@ jobs:
|
||||
persist-credentials: false
|
||||
submodules: recursive
|
||||
|
||||
- name: Ccache ${{ github.ref }}
|
||||
uses: ./.github/actions/ccache-action
|
||||
with:
|
||||
key: BE-UT-Clang
|
||||
max-size: "2G"
|
||||
restore-keys: BE-UT-Clang-
|
||||
|
||||
- name: Paths filter
|
||||
- name: Paths Filter
|
||||
if: ${{ github.event_name != 'schedule' }}
|
||||
uses: ./.github/actions/paths-filter
|
||||
id: filter
|
||||
with:
|
||||
@ -54,8 +48,16 @@ jobs:
|
||||
- 'gensrc/proto/**'
|
||||
- 'gensrc/thrift/**'
|
||||
|
||||
- name: Ccache ${{ github.ref }}
|
||||
if: ${{ github.event_name == 'schedule' || steps.filter.outputs.be_changes == 'true' }}
|
||||
uses: ./.github/actions/ccache-action
|
||||
with:
|
||||
key: BE-UT-Clang
|
||||
max-size: "2G"
|
||||
restore-keys: BE-UT-Clang-
|
||||
|
||||
- name: Run UT ${{ github.ref }}
|
||||
if: ${{ steps.filter.outputs.be_changes == 'true' }}
|
||||
if: ${{ github.event_name == 'schedule' || steps.filter.outputs.be_changes == 'true' }}
|
||||
run: |
|
||||
export DEFAULT_DIR='/opt/doris'
|
||||
|
||||
@ -81,6 +83,3 @@ jobs:
|
||||
export PATH="${DEFAULT_DIR}/ldb-toolchain/bin/:$(pwd)/thirdparty/installed/bin/:${PATH}"
|
||||
DORIS_TOOLCHAIN=clang ./run-be-ut.sh -j "$(nproc)" --run --clean
|
||||
|
||||
- name: Skip UT ${{ github.ref }}
|
||||
if: ${{ steps.filter.outputs.be_changes == 'false' }}
|
||||
run: echo 'No need to run.'
|
||||
|
||||
23
.github/workflows/be-ut-mac.yml
vendored
23
.github/workflows/be-ut-mac.yml
vendored
@ -37,14 +37,8 @@ jobs:
|
||||
persist-credentials: false
|
||||
submodules: recursive
|
||||
|
||||
- name: Ccache ${{ github.ref }}
|
||||
uses: ./.github/actions/ccache-action
|
||||
with:
|
||||
key: BE-UT-macOS
|
||||
max-size: "2G"
|
||||
restore-keys: BE-UT-macOS-
|
||||
|
||||
- name: Paths filter
|
||||
- name: Paths Filter
|
||||
if: ${{ github.event_name != 'schedule' }}
|
||||
uses: ./.github/actions/paths-filter
|
||||
id: filter
|
||||
with:
|
||||
@ -54,8 +48,16 @@ jobs:
|
||||
- 'gensrc/proto/**'
|
||||
- 'gensrc/thrift/**'
|
||||
|
||||
- name: Ccache ${{ github.ref }}
|
||||
if: ${{ github.event_name == 'schedule' || steps.filter.outputs.be_changes == 'true' }}
|
||||
uses: ./.github/actions/ccache-action
|
||||
with:
|
||||
key: BE-UT-macOS
|
||||
max-size: "2G"
|
||||
restore-keys: BE-UT-macOS-
|
||||
|
||||
- name: Run UT ${{ github.ref }}
|
||||
if: ${{ steps.filter.outputs.be_changes == 'true' }}
|
||||
if: ${{ github.event_name == 'schedule' || steps.filter.outputs.be_changes == 'true' }}
|
||||
run: |
|
||||
cellars=(
|
||||
'automake'
|
||||
@ -88,6 +90,3 @@ jobs:
|
||||
|
||||
./run-be-ut.sh --run -j "$(nproc)" --clean
|
||||
|
||||
- name: Skip UT ${{ github.ref }}
|
||||
if: ${{ steps.filter.outputs.be_changes == 'false' }}
|
||||
run: echo 'No need to run.'
|
||||
|
||||
Reference in New Issue
Block a user