Skip to content

Commit 6d8bc38

Browse files
authored
Enable label-based image test and use free runner to run lint (#2864)
### What this PR does / why we need it? - Enable label-based image test and use free runner to run lint - soft revert 26f388b ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? - vLLM version: main - vLLM main: vllm-project/vllm@404c85c Signed-off-by: Yikun Jiang <yikunkero@gmail.com>
1 parent 778cb72 commit 6d8bc38

9 files changed

+57
-24
lines changed

.github/workflows/image_310p_openeuler.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ on:
2525
- 'cmake/**'
2626
- 'CMakeLists.txt'
2727
- 'csrc/**'
28+
types: [ labeled ]
2829
push:
2930
# Publish image when tagging, the Dockerfile in tag will be build as tag image
3031
branches:
@@ -43,6 +44,11 @@ on:
4344
- 'CMakeLists.txt'
4445
- 'csrc/**'
4546

47+
# only cancel in-progress runs of the same workflow
48+
concurrency:
49+
group: ${{ github.workflow }}-${{ github.ref }}
50+
cancel-in-progress: true
51+
4652
jobs:
4753
build:
4854
name: vllm-ascend image build
@@ -52,6 +58,7 @@ jobs:
5258
'ubuntu-latest' ||
5359
'ubuntu-24.04-arm'
5460
}}
61+
if: ${{ contains(github.event.pull_request.labels.*.name, 'ready') && contains(github.event.pull_request.labels.*.name, 'ready-for-test') }}
5562
steps:
5663
- uses: actions/checkout@v4
5764
with:

.github/workflows/image_310p_ubuntu.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ on:
2525
- 'cmake/**'
2626
- 'CMakeLists.txt'
2727
- 'csrc/**'
28+
types: [ labeled ]
2829
push:
2930
# Publish image when tagging, the Dockerfile in tag will be build as tag image
3031
branches:
@@ -42,12 +43,18 @@ on:
4243
- 'cmake/**'
4344
- 'CMakeLists.txt'
4445
- 'csrc/**'
46+
47+
# only cancel in-progress runs of the same workflow
48+
concurrency:
49+
group: ${{ github.workflow }}-${{ github.ref }}
50+
cancel-in-progress: true
51+
4552
jobs:
4653

4754
build:
4855
name: vllm-ascend image build
4956
runs-on: ubuntu-latest
50-
57+
if: ${{ contains(github.event.pull_request.labels.*.name, 'ready') && contains(github.event.pull_request.labels.*.name, 'ready-for-test') }}
5158
steps:
5259
- uses: actions/checkout@v4
5360
with:

.github/workflows/image_a3_openeuler.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ on:
2525
- 'cmake/**'
2626
- 'CMakeLists.txt'
2727
- 'csrc/**'
28+
types: [ labeled ]
2829
push:
2930
# Publish image when tagging, the Dockerfile in tag will be build as tag image
3031
branches:
@@ -43,6 +44,11 @@ on:
4344
- 'CMakeLists.txt'
4445
- 'csrc/**'
4546

47+
# only cancel in-progress runs of the same workflow
48+
concurrency:
49+
group: ${{ github.workflow }}-${{ github.ref }}
50+
cancel-in-progress: true
51+
4652
jobs:
4753
build:
4854
name: vllm-ascend image build
@@ -52,6 +58,7 @@ jobs:
5258
'ubuntu-latest' ||
5359
'ubuntu-24.04-arm'
5460
}}
61+
if: ${{ contains(github.event.pull_request.labels.*.name, 'ready') && contains(github.event.pull_request.labels.*.name, 'ready-for-test') }}
5562
steps:
5663
- uses: actions/checkout@v4
5764
with:

.github/workflows/image_a3_ubuntu.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ on:
2525
- 'cmake/**'
2626
- 'CMakeLists.txt'
2727
- 'csrc/**'
28+
types: [ labeled ]
2829
push:
2930
# Publish image when tagging, the Dockerfile in tag will be build as tag image
3031
branches:
@@ -42,12 +43,18 @@ on:
4243
- 'cmake/**'
4344
- 'CMakeLists.txt'
4445
- 'csrc/**'
46+
47+
# only cancel in-progress runs of the same workflow
48+
concurrency:
49+
group: ${{ github.workflow }}-${{ github.ref }}
50+
cancel-in-progress: true
51+
4552
jobs:
4653

4754
build:
4855
name: vllm-ascend image build
4956
runs-on: ubuntu-latest
50-
57+
if: ${{ contains(github.event.pull_request.labels.*.name, 'ready') && contains(github.event.pull_request.labels.*.name, 'ready-for-test') }}
5158
steps:
5259
- uses: actions/checkout@v4
5360
with:

.github/workflows/image_openeuler.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ on:
2424
- 'cmake/**'
2525
- 'CMakeLists.txt'
2626
- 'csrc/**'
27+
types: [ labeled ]
2728
push:
2829
# Publish image when tagging, the Dockerfile in tag will be build as tag image
2930
branches:
@@ -42,6 +43,11 @@ on:
4243
- 'CMakeLists.txt'
4344
- 'csrc/**'
4445

46+
# only cancel in-progress runs of the same workflow
47+
concurrency:
48+
group: ${{ github.workflow }}-${{ github.ref }}
49+
cancel-in-progress: true
50+
4551
jobs:
4652
build:
4753
name: vllm-ascend image build
@@ -51,6 +57,7 @@ jobs:
5157
'ubuntu-latest' ||
5258
'ubuntu-24.04-arm'
5359
}}
60+
if: ${{ contains(github.event.pull_request.labels.*.name, 'ready') && contains(github.event.pull_request.labels.*.name, 'ready-for-test') }}
5461
steps:
5562
- uses: actions/checkout@v4
5663
with:

.github/workflows/image_ubuntu.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ on:
2525
- 'cmake/**'
2626
- 'CMakeLists.txt'
2727
- 'csrc/**'
28+
types: [ labeled ]
2829
push:
2930
# Publish image when tagging, the Dockerfile in tag will be build as tag image
3031
branches:
@@ -42,12 +43,18 @@ on:
4243
- 'cmake/**'
4344
- 'CMakeLists.txt'
4445
- 'csrc/**'
46+
47+
# only cancel in-progress runs of the same workflow
48+
concurrency:
49+
group: ${{ github.workflow }}-${{ github.ref }}
50+
cancel-in-progress: true
51+
4552
jobs:
4653

4754
build:
4855
name: vllm-ascend image build
4956
runs-on: ubuntu-latest
50-
57+
if: ${{ contains(github.event.pull_request.labels.*.name, 'ready') && contains(github.event.pull_request.labels.*.name, 'ready-for-test') }}
5158
steps:
5259
- uses: actions/checkout@v4
5360
with:

.github/workflows/pre-commit.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,13 @@ permissions:
88

99
jobs:
1010
pre-commit:
11-
runs-on: linux-amd64-cpu-8
12-
container:
13-
image: swr.cn-southwest-2.myhuaweicloud.com/base_image/ascend-ci/cann:8.2.rc1-910b-ubuntu22.04-py3.11
11+
runs-on: ubuntu-latest
1412
steps:
15-
- name: Config mirrors
16-
run: |
17-
sed -Ei 's@(ports|archive).ubuntu.com@cache-service.nginx-pypi-cache.svc.cluster.local:8081@g' /etc/apt/sources.list
18-
pip config set global.index-url http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple
19-
pip config set global.trusted-host cache-service.nginx-pypi-cache.svc.cluster.local
20-
apt-get update -y
21-
apt install git -y
2213
- name: Checkout vllm-project/vllm-ascend repo
2314
uses: actions/checkout@v4
15+
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
16+
with:
17+
python-version: "3.11"
2418
- run: echo "::add-matcher::.github/workflows/matchers/actionlint.json"
2519
- run: echo "::add-matcher::.github/workflows/matchers/mypy.json"
2620
- name: Checkout vllm-project/vllm repo
@@ -36,9 +30,9 @@ jobs:
3630
- name: Install vllm-ascend dev
3731
run: |
3832
pip install -r requirements-dev.txt --extra-index-url https://download.pytorch.org/whl/cpu
39-
git config --global --add safe.directory '*'
40-
- name: Run pre-commit check
33+
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
4134
env:
42-
SHELLCHECK_OPTS: "--exclude=SC2046,SC2006,SC2086"
43-
GOPROXY: "https://goproxy.cn,direct"
44-
run: pre-commit run --all-files --hook-stage manual
35+
SHELLCHECK_OPTS: "--exclude=SC2046,SC2006,SC2086" # Exclude SC2046, SC2006, SC2086 for actionlint
36+
with:
37+
extra_args: --all-files --hook-stage manual
38+

.github/workflows/vllm_ascend_test.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ jobs:
4343
uses: ./.github/workflows/pre-commit.yml
4444

4545
changes:
46-
runs-on: linux-amd64-cpu-0
47-
container:
48-
image: swr.cn-southwest-2.myhuaweicloud.com/base_image/ascend-ci/cann:8.2.rc1-910b-ubuntu22.04-py3.11
46+
if: github.event_name == 'pull_request'
47+
runs-on: ubuntu-latest
4948
outputs:
5049
e2e_tracker: ${{ steps.filter.outputs.e2e_tracker }}
5150
ut_tracker: ${{ steps.filter.outputs.ut_tracker }}

.github/workflows/vllm_ascend_test_full.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@ concurrency:
3838

3939
jobs:
4040
changes:
41-
runs-on: linux-amd64-cpu-0
41+
runs-on: ubuntu-latest
4242
if: ${{ contains(github.event.pull_request.labels.*.name, 'ready') && contains(github.event.pull_request.labels.*.name, 'ready-for-test') }}
43-
container:
44-
image: swr.cn-southwest-2.myhuaweicloud.com/base_image/ascend-ci/cann:8.2.rc1-910b-ubuntu22.04-py3.11
4543
outputs:
4644
e2e_tracker: ${{ steps.filter.outputs.e2e_tracker }}
4745
ut_tracker: ${{ steps.filter.outputs.ut_tracker }}

0 commit comments

Comments
 (0)