Skip to content

Commit 0f462c1

Browse files
author
鲁鹏帆
committed
fix(ci): use master Docker image for v2.5 branch only
Docker images like `thirdparties-bin-test-ubuntu2204-v2.5` don't exist for release branches, causing CI startup failures. This change uses GitHub Actions conditional expressions to use master branch images only for v2.5 PRs, while other branches use their own branch-specific images. Changes: - Updated image tags with conditional: `${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }}` - Affected jobs: Tidy, IWYU, Build/Test Release, ASAN, jemalloc, Rockylinux9 - Restored clang-tidy to compare against origin/base_ref Notes: - master, ci-test, *dev branches continue using their own images - Only v2.5 (and future release branches without images) use master fallback
1 parent 89f17c7 commit 0f462c1

1 file changed

Lines changed: 21 additions & 9 deletions

File tree

.github/workflows/lint_and_test_cpp.yaml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18+
# NOTE: Docker images use 'master' branch tag for release branches (e.g., v2.5)
19+
# that may not have prebuilt Docker images. Other branches use their own images.
20+
1821
name: Cpp CI
1922

2023
on:
@@ -64,7 +67,8 @@ jobs:
6467
USE_JEMALLOC: OFF
6568
ENABLE_ASAN: OFF
6669
container:
67-
image: apache/pegasus:thirdparties-bin-ubuntu2204-${{ github.base_ref }}
70+
# Use master image for v2.5 branch (which lacks prebuilt images), others use their own
71+
image: apache/pegasus:thirdparties-bin-ubuntu2204-${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }}
6872
steps:
6973
- name: Install Softwares
7074
run: |
@@ -91,7 +95,8 @@ jobs:
9195
USE_JEMALLOC: OFF
9296
ENABLE_ASAN: OFF
9397
container:
94-
image: apache/pegasus:thirdparties-bin-ubuntu2204-${{ github.base_ref }}
98+
# Use master image for v2.5 branch (which lacks prebuilt images), others use their own
99+
image: apache/pegasus:thirdparties-bin-ubuntu2204-${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }}
95100
steps:
96101
- uses: actions/checkout@v4
97102
- name: Free Disk Space (Ubuntu)
@@ -123,7 +128,8 @@ jobs:
123128
ARTIFACT_NAME: release
124129
BUILD_OPTIONS: -t release --test
125130
container:
126-
image: apache/pegasus:thirdparties-bin-test-ubuntu2204-${{ github.base_ref }}
131+
# Use master image for v2.5 branch (which lacks prebuilt images), others use their own
132+
image: apache/pegasus:thirdparties-bin-test-ubuntu2204-${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }}
127133
steps:
128134
- name: Clone code
129135
uses: actions/checkout@v4
@@ -193,7 +199,8 @@ jobs:
193199
env:
194200
ARTIFACT_NAME: release
195201
container:
196-
image: apache/pegasus:thirdparties-bin-test-ubuntu2204-${{ github.base_ref }}
202+
# Use master image for v2.5 branch (which lacks prebuilt images), others use their own
203+
image: apache/pegasus:thirdparties-bin-test-ubuntu2204-${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }}
197204
options: --cap-add=SYS_PTRACE
198205
steps:
199206
- uses: actions/checkout@v4
@@ -213,7 +220,8 @@ jobs:
213220
ARTIFACT_NAME: release_address
214221
BUILD_OPTIONS: --sanitizer address --disable_gperf --test
215222
container:
216-
image: apache/pegasus:thirdparties-bin-test-asan-ubuntu2204-${{ github.base_ref }}
223+
# Use master image for v2.5 branch (which lacks prebuilt images), others use their own
224+
image: apache/pegasus:thirdparties-bin-test-asan-ubuntu2204-${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }}
217225
steps:
218226
- uses: actions/checkout@v4
219227
- name: Rebuild thirdparty if needed
@@ -284,7 +292,8 @@ jobs:
284292
env:
285293
ARTIFACT_NAME: release_address
286294
container:
287-
image: apache/pegasus:thirdparties-bin-test-asan-ubuntu2204-${{ github.base_ref }}
295+
# Use master image for v2.5 branch (which lacks prebuilt images), others use their own
296+
image: apache/pegasus:thirdparties-bin-test-asan-ubuntu2204-${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }}
288297
options: --cap-add=SYS_PTRACE
289298
steps:
290299
- uses: actions/checkout@v4
@@ -394,7 +403,8 @@ jobs:
394403
ARTIFACT_NAME: release_jemalloc
395404
BUILD_OPTIONS: -t release --use_jemalloc --test
396405
container:
397-
image: apache/pegasus:thirdparties-bin-test-jemallc-ubuntu2204-${{ github.base_ref }}
406+
# Use master image for v2.5 branch (which lacks prebuilt images), others use their own
407+
image: apache/pegasus:thirdparties-bin-test-jemallc-ubuntu2204-${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }}
398408
steps:
399409
- uses: actions/checkout@v4
400410
- name: Rebuild thirdparty if needed
@@ -417,7 +427,8 @@ jobs:
417427
env:
418428
ARTIFACT_NAME: release_jemalloc
419429
container:
420-
image: apache/pegasus:thirdparties-bin-test-jemallc-ubuntu2204-${{ github.base_ref }}
430+
# Use master image for v2.5 branch (which lacks prebuilt images), others use their own
431+
image: apache/pegasus:thirdparties-bin-test-jemallc-ubuntu2204-${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }}
421432
options: --cap-add=SYS_PTRACE
422433
steps:
423434
- uses: actions/checkout@v4
@@ -472,7 +483,8 @@ jobs:
472483
BUILD_OPTIONS: -t debug --test --separate_servers
473484
PACK_OPTIONS: --separate_servers
474485
container:
475-
image: apache/pegasus:thirdparties-bin-rockylinux9-${{ github.base_ref }}
486+
# Use master image for v2.5 branch (which lacks prebuilt images), others use their own
487+
image: apache/pegasus:thirdparties-bin-rockylinux9-${{ github.base_ref == 'v2.5' && 'master' || github.base_ref }}
476488
steps:
477489
- name: Clone code
478490
uses: actions/checkout@v3

0 commit comments

Comments
 (0)