Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 0 additions & 10 deletions .github/TEST_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,16 +195,6 @@ python3 .github/workflows/scripts/select_tests.py --diff-base origin/main

# Route based on explicit changed files
python3 .github/workflows/scripts/select_tests.py --changed-files vllm_ascend/ops/foo.py

# Run a specific subset of e2e tests (mirrors the /e2e slash command)
python3 .github/workflows/scripts/select_tests.py \
--explicit-e2e-tests tests/e2e/pull_request/one_card/test_foo.py \
tests/e2e/pull_request/two_card/test_bar.py

# Run a single test method (supports the same ::nodeid syntax as pytest)
python3 .github/workflows/scripts/select_tests.py \
--explicit-e2e-tests \
tests/e2e/pull_request/one_card/test_foo.py::TestClass::test_method
```

## Testing Changes to `select_tests.py`
Expand Down
19 changes: 0 additions & 19 deletions .github/actions/read-vllm-release-tag/action.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/vllm-main-verified.commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
967c5c3bc38891f4465d3f4e99917ed837bb3833
9090368b650896bf5fc990c921df7eb4c20355a5
2 changes: 1 addition & 1 deletion .github/vllm-release-tag.commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.22.1
v0.21.0
112 changes: 112 additions & 0 deletions .github/workflows/_e2e_periodic_ops.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
#
# Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This file is a part of the vllm-ascend project.
#

# Lightweight reusable workflow for periodic ops tests.
# Runs pytest against the specified test target (file or directory).

name: 'e2e periodic ops test'

on:
workflow_call:
inputs:
runner:
required: true
type: string
description: GitHub Actions runner label
image:
required: true
type: string
description: Docker image to use for the test container
tests:
required: true
type: string
description: pytest target(s) — a .py file, a directory, or a space-separated list of files (one per-chip group)
name:
required: true
type: string
description: human-readable test name used in job labels and logs
should_run:
required: true
type: boolean
description: set to false to skip this job (matrix-level gate)
vllm_ascend_branch:
required: true
type: string
description: branch ref used for checkout
request_id:
required: false
type: string
default: ''
description: non-empty when triggered by PR /nightly command
vllm_ascend_ref:
required: false
type: string
default: ''
description: PR commit SHA for PR-triggered checkout
dry_run:
required: false
type: boolean
default: false
description: print resolved inputs and skip ops execution

defaults:
run:
shell: bash -el {0}

jobs:
dry-run:
name: dry-run / ${{ inputs.name }}
runs-on: ${{ inputs.runner }}
if: ${{ inputs.should_run && inputs.dry_run }}
steps:
- name: Print dry-run inputs
run: |
echo "workflow=e2e_periodic_ops"
echo "runner=${{ inputs.runner }}"
echo "image=${{ inputs.image }}"
echo "tests=${{ inputs.tests }}"
echo "name=${{ inputs.name }}"
echo "vllm_ascend_branch=${{ inputs.vllm_ascend_branch }}"

ops-test:
name: ${{ inputs.name }}
runs-on: ${{ inputs.runner }}
if: ${{ inputs.should_run && !inputs.dry_run }}
container:
image: ${{ inputs.image }}
options: --network host --shm-size 1g --device /dev/davinci_manager --device /dev/hisi_hdc --device /dev/devmm_svm
volumes:
- /usr/local/dcmi:/usr/local/dcmi
- /usr/local/bin/npu-smi:/usr/local/bin/npu-smi
- /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/
- /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info
- /etc/ascend_install.info:/etc/ascend_install.info

steps:
- name: Checkout vllm-ascend
uses: actions/checkout@v6
with:
ref: ${{ inputs.request_id != '' && inputs.vllm_ascend_ref || inputs.vllm_ascend_branch }}

- name: Install vllm-ascend
run: pip install -e . --no-build-isolation

- name: Run ops tests
# 'tests' may be a single path or a space-separated list of files
# (a per-chip group expanded from a directory entry); leave it unquoted
# so the shell splits it into separate pytest arguments.
run: pytest -s ${{ inputs.tests }}
153 changes: 13 additions & 140 deletions .github/workflows/_schedule_image_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ on:
description: 'Quay username for pushing images'
required: false
type: string
quay_temp_username:
description: 'Quay username for pushing temp tag digests'
required: false
type: string
workflow_dispatch_tag:
description: 'The tag to use for workflow dispatch'
required: false
Expand All @@ -42,32 +38,13 @@ on:
required: false
type: string
default: 'digests'
vllm_commit:
description: 'vLLM commit hash to checkout (used when set; mutually exclusive with tag/branch).'
required: false
type: string
default: ''
vllm_ascend_commit:
description: 'vllm-ascend commit hash to checkout (used when set; mutually exclusive with tag/branch).'
required: false
type: string
default: ''
temp_only:
description: 'If true, push only to QUAY_TEMP_REPO and skip the merge-image job (no push to QUAY_REPO).'
required: false
type: boolean
default: false
secrets:
QUAY_PASSWORD:
description: 'Quay password for pushing images'
required: false
QUAY_TEMP_PASSWORD:
description: 'Quay password for pushing temp tag digests'
required: false

env:
QUAY_REPO: quay.io/ascend/vllm-ascend
QUAY_TEMP_REPO: quay.io/atlas-ci/vllm-atlas-temp
CACHE_REPO: ghcr.io/vllm-project/vllm-ascend

jobs:
Expand All @@ -94,47 +71,15 @@ jobs:
run: |
tag="${{ inputs.workflow_dispatch_tag }}"
branch="${{ inputs.branch_ref }}"
vllm_commit="${{ inputs.vllm_commit }}"
vllm_ascend_commit="${{ inputs.vllm_ascend_commit }}"

commit_mode="false"
if [[ -n "$vllm_commit" || -n "$vllm_ascend_commit" ]]; then
if [[ -z "$vllm_commit" || -z "$vllm_ascend_commit" ]]; then
echo "Error: 'vllm_commit' and 'vllm_ascend_commit' must be specified together."
exit 1
fi
for c in "$vllm_commit" "$vllm_ascend_commit"; do
if ! echo "$c" | grep -Eq '^[0-9a-f]{7,40}$'; then
echo "Error: invalid commit format: $c (expected 7-40 hex chars)."
exit 1
fi
done
commit_mode="true"
if [[ -n "$tag" && -n "$branch" ]]; then
echo "Error: 'tag' and 'branch' are mutually exclusive. Please specify only one."
exit 1
fi

if [[ "$commit_mode" == "true" ]]; then
if [[ -n "$tag" || -n "$branch" ]]; then
echo "Error: commit mode is mutually exclusive with 'tag'/'branch'."
exit 1
fi
else
if [[ -n "$tag" && -n "$branch" ]]; then
echo "Error: 'tag' and 'branch' are mutually exclusive. Please specify only one."
exit 1
fi
if [[ -z "$tag" && -z "$branch" ]]; then
echo "Error: Either 'tag', 'branch', or (vllm_commit + vllm_ascend_commit) must be specified."
exit 1
fi
if [[ -z "$tag" && -z "$branch" ]]; then
echo "Error: Either 'tag' or 'branch' must be specified."
exit 1
fi

- uses: actions/checkout@v6
if: ${{ github.event_name == 'workflow_dispatch' && inputs.vllm_ascend_commit != '' }}
with:
fetch-depth: 0
persist-credentials: false
ref: ${{ inputs.vllm_ascend_commit }}

- uses: actions/checkout@v6
if: ${{ github.event_name != 'workflow_dispatch' }}
with:
Expand All @@ -150,7 +95,7 @@ jobs:
ref: ${{ inputs.workflow_dispatch_tag }}

- uses: actions/checkout@v6
if: ${{ github.event_name == 'workflow_dispatch' && inputs.workflow_dispatch_tag == '' && inputs.vllm_ascend_commit == '' }}
if: ${{ github.event_name == 'workflow_dispatch' && inputs.workflow_dispatch_tag == '' }}
with:
fetch-depth: 0
persist-credentials: false
Expand All @@ -162,13 +107,13 @@ jobs:
tool-cache: true
docker-images: false

- name: Publish - Login to Quay Temp (for pushing temp tag digest)
- name: Publish - Login to Quay Container Registry
if: ${{ inputs.should_push }}
uses: docker/login-action@v4
with:
registry: quay.io
username: ${{ inputs.quay_temp_username }}
password: ${{ secrets.QUAY_TEMP_PASSWORD }}
username: ${{ inputs.quay_username }}
password: ${{ secrets.QUAY_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
Expand Down Expand Up @@ -229,40 +174,17 @@ jobs:
file: ${{ inputs.dockerfile || 'Dockerfile' }}
# only trigger when tag, branch/main push
push: ${{ inputs.should_push }}
outputs: type=image,name=${{ env.QUAY_TEMP_REPO }},push-by-digest=true,name-canonical=true,push=${{ inputs.should_push }}
outputs: type=image,name=${{ env.QUAY_REPO }},push-by-digest=true,name-canonical=true,push=${{ inputs.should_push }}
build-args: |
PIP_INDEX_URL=https://pypi.org/simple
COMPILE_CUSTOM_KERNELS=${{ steps.cache-csrc.outputs.cache-hit == 'true' && '0' || '1' }}
VLLM_COMMIT=${{ inputs.vllm_commit }}
provenance: false
# To speed up the build, we use registry cache. The cache tag is determined by the suffix and architecture, and shared across different workflow runs.
# For example, the cache tag for arm64 image with suffix "openeuler" will be "buildcache-openeuler-arm64".
# When a new image is built and pushed, the cache will also be updated in the registry, so that next build can benefit from it.
cache-from: type=registry,ref=${{ env.CACHE_REPO }}:${{ steps.cache-tag.outputs.value }}
cache-to: ${{ inputs.should_push && format('type=registry,ref={0}:{1},mode=max', env.CACHE_REPO, steps.cache-tag.outputs.value) || '' }}

# Quay.io automatically cleans up untagged digests on a regular basis, with a cycle of approximately one hour.
# Add temporary tags to digests to prevent them from being removed.
- name: Tag digest to prevent GC
if: ${{ inputs.should_push }}
run: |
SUFFIX=""
if [ -n "${{ inputs.suffix }}" ]; then
SUFFIX="-${{ inputs.suffix }}"
fi
if [ "${{ inputs.temp_only }}" = "true" ]; then
VLLM_SHORT=$(echo "${{ inputs.vllm_commit }}" | cut -c1-7)
ASCEND_SHORT=$(echo "${{ inputs.vllm_ascend_commit }}" | cut -c1-7)
TAG="vllm-ascend-${VLLM_SHORT}-${ASCEND_SHORT}${SUFFIX}-${{ matrix.tag }}-temp"
else
TAG="nightly-${{ inputs.schedule_tag_pattern }}${SUFFIX}-${{ matrix.tag }}-temp"
fi
echo "Creating temp tag: ${{ env.QUAY_TEMP_REPO }}:$TAG"
docker buildx imagetools create \
-t "${{ env.QUAY_TEMP_REPO }}:$TAG" \
"${{ env.QUAY_TEMP_REPO }}@${{ steps.build.outputs.digest }}"


- name: Export digest
run: |
mkdir -p ${{ runner.temp }}/digests
Expand All @@ -281,7 +203,7 @@ jobs:
merge-image:
runs-on: ubuntu-latest
needs: build-push-digest
if: ${{ inputs.should_push && !inputs.temp_only }}
if: ${{ inputs.should_push }}
steps:
- name: Checkout branch
uses: actions/checkout@v6
Expand Down Expand Up @@ -365,7 +287,7 @@ jobs:

- name: Merge and push multi-arch image
env:
IMAGE: ${{ env.QUAY_TEMP_REPO }}
IMAGE: ${{ env.QUAY_REPO }}
TAGS: ${{ steps.meta.outputs.tags }}
run: |
DIGESTS=$(printf "$IMAGE@sha256:%s " $(ls ${{ runner.temp }}/digests))
Expand All @@ -380,52 +302,3 @@ jobs:
-t "$tag" \
$DIGESTS
done

merge-image-temp:
name: merge-image-temp
runs-on: ubuntu-latest
needs: build-push-digest
if: ${{ inputs.should_push && inputs.temp_only }}
steps:
- name: Download arm64 digests
uses: actions/download-artifact@v8
with:
path: ${{ runner.temp }}/digests
pattern: ${{ inputs.artifact_prefix }}-${{ inputs.suffix }}-arm64
merge-multiple: true

- name: Download amd64 digests
uses: actions/download-artifact@v8
with:
path: ${{ runner.temp }}/digests
pattern: ${{ inputs.artifact_prefix }}-${{ inputs.suffix }}-amd64
merge-multiple: true

- name: Login to Quay Temp
uses: docker/login-action@v4
with:
registry: quay.io
username: ${{ inputs.quay_temp_username }}
password: ${{ secrets.QUAY_TEMP_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Merge and push multi-arch manifest to QUAY_TEMP_REPO
env:
IMAGE: ${{ env.QUAY_TEMP_REPO }}
run: |
set -euo pipefail
SUFFIX=""
if [ -n "${{ inputs.suffix }}" ]; then
SUFFIX="-${{ inputs.suffix }}"
fi
VLLM_SHORT=$(echo "${{ inputs.vllm_commit }}" | cut -c1-7)
ASCEND_SHORT=$(echo "${{ inputs.vllm_ascend_commit }}" | cut -c1-7)
TAG="${IMAGE}:vllm-ascend-${VLLM_SHORT}-${ASCEND_SHORT}${SUFFIX}"
DIGESTS=$(printf "$IMAGE@sha256:%s " $(ls ${{ runner.temp }}/digests))
echo "Digests: $DIGESTS"
echo "Creating multi-arch manifest tag: $TAG"
docker buildx imagetools create \
-t "$TAG" \
$DIGESTS
Loading
Loading