Skip to content

Commit f0b9dfb

Browse files
Merge branch 'main' into validate/docker-actions-self-hosted
2 parents 89b5812 + d40b187 commit f0b9dfb

202 files changed

Lines changed: 30311 additions & 72130 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/_selected_tests.yaml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,17 @@ on:
4747
required: false
4848
default: false
4949
description: 'Continue running the job even if tests fail'
50+
enable-coverage:
51+
type: boolean
52+
required: false
53+
default: false
54+
description: 'Whether to run tests with coverage enabled.'
55+
secrets:
56+
OBS_ACCESS_KEY_PRECISION:
57+
required: false
58+
OBS_SECRET_ACCESS_KEY_PRECISION:
59+
required: false
60+
5061

5162
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
5263
# declared as "shell: bash -el {0}" on steps that need to be properly activated.
@@ -244,8 +255,12 @@ jobs:
244255
continue-on-error: ${{ inputs.continue_on_error }}
245256
env:
246257
VLLM_WORKER_MULTIPROC_METHOD: spawn
258+
ENABLE_COVERAGE: ${{ inputs.enable-coverage}}
247259
run: |
248260
. /usr/local/Ascend/ascend-toolkit/set_env.sh
261+
if [ "${{ inputs.enable-coverage }}" = "true" ]; then
262+
export ENABLE_COVERAGE=true
263+
fi
249264
TIMING_FLAG=""
250265
if [ "${{ inputs.upload_timing }}" = "true" ]; then
251266
TIMING_FLAG="--timing"
@@ -263,7 +278,11 @@ jobs:
263278
env:
264279
VLLM_WORKER_MULTIPROC_METHOD: spawn
265280
TORCH_DEVICE_BACKEND_AUTOLOAD: 0
281+
ENABLE_COVERAGE: ${{ inputs.enable-coverage}}
266282
run: |
283+
if [ "${{ inputs.enable-coverage }}" = "true" ]; then
284+
export ENABLE_COVERAGE=true
285+
fi
267286
.github/workflows/scripts/run_selected_tests.sh \
268287
"${{ matrix.group.npu_type }}" \
269288
"${{ matrix.group.num_npus }}" \
@@ -280,6 +299,17 @@ jobs:
280299
if-no-files-found: ignore
281300
retention-days: 7
282301

302+
- name: Upload coverage data
303+
if: ${{ always() && inputs.enable-coverage }}
304+
continue-on-error: true
305+
uses: actions/upload-artifact@v7
306+
with:
307+
name: selected-test-coverage-vllm-${{ inputs.vllm }}-${{ matrix.group.npu_type }}-${{ matrix.group.num_npus }}card-${{ matrix.group.partition }}
308+
path: tests/outputs/**/covdata/**
309+
if-no-files-found: ignore
310+
retention-days: 14
311+
compression-level: 0
312+
283313
- name: Upload selected test logs
284314
if: always()
285315
continue-on-error: true
@@ -290,3 +320,112 @@ jobs:
290320
if-no-files-found: ignore
291321
retention-days: 14
292322
compression-level: 0
323+
324+
upload-coverage-to-obs:
325+
if: ${{ always() && inputs.enable-coverage }}
326+
needs: selected-tests
327+
runs-on: ubuntu-latest
328+
continue-on-error: true
329+
env:
330+
OBS_ACCESS_KEY: ${{ secrets.OBS_ACCESS_KEY_PRECISION }}
331+
OBS_SECRET_KEY: ${{ secrets.OBS_SECRET_ACCESS_KEY_PRECISION }}
332+
steps:
333+
- name: Checkout vllm-ascend source code
334+
uses: actions/checkout@v6
335+
with:
336+
ref: ${{ inputs.ref || github.ref }}
337+
338+
- name: Download all coverage artifacts
339+
uses: actions/download-artifact@v5
340+
with:
341+
path: all-coverage
342+
pattern: selected-test-coverage-*
343+
merge-multiple: true
344+
345+
- name: Debug - List downloaded coverage files
346+
run: |
347+
echo "=== all-coverage top level ==="
348+
find all-coverage -maxdepth 1 2>/dev/null | head -20 || echo "all-coverage directory not exist"
349+
echo ""
350+
echo "=== all-coverage total file count ==="
351+
find all-coverage -type f 2>/dev/null | wc -l
352+
echo "=== sample covdata dirs ==="
353+
find all-coverage -type d -name covdata 2>/dev/null | head -10
354+
echo "=== sample files ==="
355+
find all-coverage -path '*/covdata/*' -type f 2>/dev/null | head -10
356+
357+
- name: Assemble and compress coverage files
358+
run: |
359+
set -euo pipefail
360+
TASK_DATE=$(date +%Y%m%d%H)
361+
TASK_NAME="VLLM-ASCEND@task_${TASK_DATE}"
362+
COVERAGE_PKG_DIR="coverage/vllm-ascend"
363+
TASK_DIR="${COVERAGE_PKG_DIR}/${TASK_NAME}"
364+
mkdir -p "${TASK_DIR}" "${COVERAGE_PKG_DIR}/covstub/vllm_ascend"
365+
366+
COVERAGE_FILE_COUNT=0
367+
while IFS= read -r f; do
368+
rel="${f#all-coverage/}"
369+
case "${rel}" in
370+
selected-test-coverage-*/*) rel="${rel#*/}" ;;
371+
esac
372+
dest="${TASK_DIR}/${rel}"
373+
mkdir -p "$(dirname "${dest}")"
374+
cp "${f}" "${dest}"
375+
COVERAGE_FILE_COUNT=$((COVERAGE_FILE_COUNT + 1))
376+
done < <(find all-coverage -path '*/covdata/*' -type f 2>/dev/null)
377+
378+
echo "Copied ${COVERAGE_FILE_COUNT} coverage files to ${TASK_DIR}"
379+
if [ "${COVERAGE_FILE_COUNT}" -eq 0 ]; then
380+
echo "::error::No coverage files found under all-coverage/*/covdata/"
381+
exit 1
382+
fi
383+
384+
cp -r vllm_ascend/. "${COVERAGE_PKG_DIR}/covstub/vllm_ascend/"
385+
cp tests/coverage_settingInfo.xml "${COVERAGE_PKG_DIR}/settingInfo.xml"
386+
echo "${TASK_NAME}" > coverage_version.txt
387+
388+
echo "=== package top level ==="
389+
find "${COVERAGE_PKG_DIR}" -maxdepth 1 2>/dev/null | head -20 || true
390+
echo "=== task dir file count ==="
391+
find "${TASK_DIR}" -type f | wc -l
392+
393+
tar cf coverage.tar -C coverage vllm-ascend
394+
echo "Packed coverage/vllm-ascend into coverage.tar"
395+
du -h coverage.tar
396+
echo "=== tar contents (sample) ==="
397+
tar tf coverage.tar | head -20 || true
398+
echo "=== tar task file count ==="
399+
tar tf coverage.tar | grep -c "vllm-ascend/${TASK_NAME}/" || true
400+
401+
{
402+
echo "TASK_DATE=${TASK_DATE}"
403+
echo "TASK_NAME=${TASK_NAME}"
404+
} >> "${GITHUB_ENV}"
405+
406+
- name: Upload coverage to OBS
407+
run: |
408+
pip install esdk-obs-python --quiet
409+
python3 - <<'EOF'
410+
import os
411+
from obs import ObsClient
412+
413+
OBS_BUCKET = 'vllm-ascend'
414+
OBS_PREFIX = 'ci/precision-test'
415+
client = ObsClient(
416+
access_key_id=os.environ['OBS_ACCESS_KEY'],
417+
secret_access_key=os.environ['OBS_SECRET_KEY'],
418+
server='https://obs.cn-north-4.myhuaweicloud.com'
419+
)
420+
421+
uploads = [
422+
('coverage.tar', f'{OBS_PREFIX}/coverage.tar'),
423+
('coverage_version.txt', f'{OBS_PREFIX}/coverage_version.txt'),
424+
]
425+
for local_path, obs_path in uploads:
426+
resp = client.putFile(OBS_BUCKET, obs_path, local_path)
427+
if resp.status < 300:
428+
print(f'Uploaded: {local_path} -> {obs_path}')
429+
else:
430+
raise Exception(f'Failed to upload {local_path}: {resp.errorMessage}')
431+
EOF

.github/workflows/misc/model_dataset_list.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@
125125
"Tencent-Hunyuan/Hy3-preview",
126126
"Tengyunw/qwen3_8b_eagle3",
127127
"Tongyi-MAI/Z-Image-Turbo",
128+
"allenai/OLMoE-1B-7B-0125-Instruct",
128129
"baichuan-inc/Baichuan2-7B-Chat",
129130
"billy800/Qwen3-30B-A3B-Instruct-2507-AWQ",
130131
"deepseek-ai/DeepSeek-OCR",
@@ -260,6 +261,8 @@
260261
"vllm-ascend/qwen2vl-flickr-lora-tower-connector",
261262
"vllm-ascend/qwen2vl-flickr-lora-tower",
262263
"vllm-ascend/qwen35-4b-text-only-sql-lora",
264+
"vllm-ascend/qwen3-moe-text2sql-spider",
265+
"vllm-ascend/olmoe-instruct-text2sql-spider",
263266
"wemaster/deepseek_mtp_main_random_bf16",
264267
"wemaster/deepseek_mtp_main_random_w8a8_part",
265268
"xlangai/OpenCUA-7B",

.github/workflows/pr_test.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,3 +215,42 @@ jobs:
215215
ref: ${{ github.event.pull_request.head.sha }}
216216
base_ref: ${{ github.base_ref }}
217217
test_groups: ${{ needs.lint-and-select-tests.outputs.test_groups }}
218+
219+
# Summary gate job — use this single, stable name as the required status check
220+
# in GitHub branch protection rules instead of tracking individual matrix job names.
221+
ci-gate:
222+
needs: [lint-and-select-tests, run-selected-tests]
223+
if: always()
224+
runs-on: linux-amd64-cpu-2-hk
225+
steps:
226+
- name: Check all required jobs
227+
run: |
228+
set -euo pipefail
229+
230+
LINT_RESULT="${{ needs.lint-and-select-tests.result }}"
231+
HAS_TESTS="${{ needs.lint-and-select-tests.outputs.has_tests }}"
232+
READY_LABELED="${{ contains(github.event.pull_request.labels.*.name, 'ready') }}"
233+
234+
echo "=== CI Gate Summary ==="
235+
echo "lint-and-select-tests: ${LINT_RESULT}"
236+
echo "has_tests: ${HAS_TESTS}"
237+
echo "ready label: ${READY_LABELED}"
238+
239+
if [ "${LINT_RESULT}" != "success" ] && [ "${LINT_RESULT}" != "skipped" ]; then
240+
echo "::error::lint-and-select-tests did not succeed (result: ${LINT_RESULT})"
241+
exit 1
242+
fi
243+
244+
# Only gate on tests when the PR actually runs them
245+
if [ "${HAS_TESTS}" = "true" ] && [ "${READY_LABELED}" = "true" ]; then
246+
TESTS_RESULT="${{ needs.run-selected-tests.result }}"
247+
echo "run-selected-tests (vllm matrix): ${TESTS_RESULT}"
248+
if [ "${TESTS_RESULT}" != "success" ]; then
249+
echo "::error::run-selected-tests did not succeed (result: ${TESTS_RESULT})"
250+
exit 1
251+
fi
252+
else
253+
echo "Skipped test gate (has_tests=${HAS_TESTS}, ready=${READY_LABELED})."
254+
fi
255+
256+
echo "=== CI Gate: PASSED ==="

.github/workflows/schedule_doc_translate.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,18 +105,20 @@ jobs:
105105
run: |
106106
python .github/workflows/scripts/po_translate.py \
107107
--files "${{ steps.detect.outputs.files }}" \
108-
--output-json /tmp/translation_results.json
108+
--output-json /tmp/translation_results.json \
109+
--ignore-validation-error
109110
110111
- name: Validate translation coverage
111112
if: steps.translate.outcome == 'success'
112113
id: validate
113114
run: |
114115
python .github/workflows/scripts/po_translate.py \
115116
--files "${{ steps.detect.outputs.files }}" \
116-
--validate-only
117+
--validate-only \
118+
--ignore-validation-error
117119
118120
- name: Process translated files
119-
if: steps.validate.outcome == 'success'
121+
if: steps.translate.outcome == 'success'
120122
id: results
121123
run: |
122124
[ ! -f /tmp/translation_results.json ] && echo "No results" && exit 1
@@ -150,7 +152,7 @@ jobs:
150152
} >> $GITHUB_OUTPUT
151153
152154
- name: Commit and push
153-
if: steps.validate.outcome == 'success'
155+
if: steps.translate.outcome == 'success'
154156
env:
155157
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
156158
run: |
@@ -160,7 +162,7 @@ jobs:
160162
git push -f fork "${{ env.BRANCH_NAME }}"
161163
162164
- name: Create PR in upstream
163-
if: steps.validate.outcome == 'success'
165+
if: steps.translate.outcome == 'success'
164166
uses: actions/github-script@v9
165167
env:
166168
FILE_LIST: ${{ steps.results.outputs.file_list }}
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
#
2+
# Copyright (c) 2026 Huawei Technologies Co., Ltd. All Rights Reserved.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
# This file is a part of the vllm-ascend project.
16+
#
17+
18+
name: Schedule Test Coverage
19+
20+
on:
21+
schedule:
22+
- cron: "0 18 * * *"
23+
workflow_dispatch:
24+
inputs:
25+
vllm_ascend_ref:
26+
description: "vllm-ascend ref (branch, tag, or SHA)"
27+
required: false
28+
default: "main"
29+
type: string
30+
31+
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
32+
# declared as "shell: bash -el {0}" on steps that need to be properly activated.
33+
# It's used to activate ascend-toolkit environment variables.
34+
defaults:
35+
run:
36+
shell: bash -el {0}
37+
38+
concurrency:
39+
group: ${{ github.workflow }}-${{ github.ref }}
40+
cancel-in-progress: true
41+
42+
jobs:
43+
select-full-tests:
44+
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
45+
runs-on: linux-amd64-cpu-8-hk
46+
container:
47+
image: quay.io/ascend-ci/vllm-ascend:lint
48+
outputs:
49+
has_tests: ${{ steps.full-scope.outputs.has_tests }}
50+
test_groups: ${{ steps.full-scope.outputs.test_groups }}
51+
matched_modules: ${{ steps.full-scope.outputs.matched_modules }}
52+
vllm_ascend_ref: ${{ steps.resolve-refs.outputs.vllm_ascend_ref }}
53+
main_commit: ${{ steps.resolve-refs.outputs.main_commit }}
54+
release_tag: ${{ steps.resolve-refs.outputs.release_tag }}
55+
steps:
56+
- name: Checkout vllm-project/vllm-ascend repo
57+
uses: actions/checkout@v6
58+
with:
59+
ref: ${{ inputs.vllm_ascend_ref || 'main' }}
60+
fetch-depth: 0
61+
62+
- name: Resolve refs
63+
id: resolve-refs
64+
run: |
65+
if [ "${{ github.event_name }}" = "pull_request" ]; then
66+
echo "vllm_ascend_ref=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_OUTPUT"
67+
else
68+
echo "vllm_ascend_ref=${{ inputs.vllm_ascend_ref || 'main' }}" >> "$GITHUB_OUTPUT"
69+
fi
70+
main_commit="$(tr -d '[:space:]' < .github/vllm-main-verified.commit)"
71+
release_tag="$(tr -d '[:space:]' < .github/vllm-release-tag.commit)"
72+
[[ "${main_commit}" =~ ^[0-9a-f]{7,40}$ ]] || {
73+
echo "::error file=.github/vllm-main-verified.commit::invalid vLLM main commit: ${main_commit}"
74+
exit 1
75+
}
76+
[[ "${release_tag}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+([.-].*)?$ ]] || {
77+
echo "::error file=.github/vllm-release-tag.commit::invalid vLLM release tag: ${release_tag}"
78+
exit 1
79+
}
80+
{
81+
echo "main_commit=${main_commit}"
82+
echo "release_tag=${release_tag}"
83+
} >> "$GITHUB_OUTPUT"
84+
85+
- name: Select all tests
86+
id: full-scope
87+
run: |
88+
pip install regex pyyaml
89+
git config --global --add safe.directory /__w/vllm-ascend/vllm-ascend
90+
python3 .github/workflows/scripts/select_tests.py \
91+
--changed-files vllm_ascend/dummy.py \
92+
--run-all-modules
93+
94+
run-full-tests:
95+
needs: select-full-tests
96+
if: ${{ needs.select-full-tests.outputs.has_tests == 'true' }}
97+
strategy:
98+
fail-fast: false
99+
matrix:
100+
vllm_version:
101+
- ${{ needs.select-full-tests.outputs.release_tag }}
102+
uses: ./.github/workflows/_selected_tests.yaml
103+
with:
104+
vllm: ${{ matrix.vllm_version }}
105+
ref: ${{ needs.select-full-tests.outputs.vllm_ascend_ref }}
106+
test_groups: ${{ needs.select-full-tests.outputs.test_groups }}
107+
enable-coverage: true
108+
secrets:
109+
OBS_ACCESS_KEY_PRECISION: ${{ secrets.OBS_ACCESS_KEY_PRECISION }}
110+
OBS_SECRET_ACCESS_KEY_PRECISION: ${{ secrets.OBS_SECRET_ACCESS_KEY_PRECISION }}

0 commit comments

Comments
 (0)