[CI] support build wheel and docker image by workflow (#6453)
Make image and wheel build CI job work with workflow_dispatch way
- vLLM version: v0.14.1
- vLLM main:
dc917cceb8
Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
This commit is contained in:
9
.github/workflows/_schedule_image_build.yaml
vendored
9
.github/workflows/_schedule_image_build.yaml
vendored
@@ -43,10 +43,18 @@ jobs:
|
||||
tag: arm64
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
if: ${{ github.event_name != 'workflow_dispatch' }}
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/checkout@v6
|
||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
ref: ${{ inputs.workflow_dispatch_tag }}
|
||||
|
||||
- name: Free up disk space
|
||||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
|
||||
with:
|
||||
@@ -148,6 +156,7 @@ jobs:
|
||||
tags: |
|
||||
type=pep440,pattern={{raw}},suffix=${{ env.SUFFIX }}
|
||||
type=schedule,pattern=main,suffix=${{ env.SUFFIX }}
|
||||
type=raw,value=${{ inputs.workflow_dispatch_tag }},enable=${{ github.event_name == 'workflow_dispatch' }},suffix=${{ env.SUFFIX }}
|
||||
flavor:
|
||||
latest=false
|
||||
|
||||
|
||||
@@ -21,9 +21,14 @@ on:
|
||||
inputs:
|
||||
tag:
|
||||
description: 'Docker tag for build results'
|
||||
type: string
|
||||
default: main
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- main
|
||||
- v0.15.0rc1
|
||||
- v0.14.0rc1
|
||||
- v0.13.0rc2
|
||||
|
||||
jobs:
|
||||
image_build:
|
||||
|
||||
@@ -25,6 +25,17 @@ on:
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: 'Docker tag for build results'
|
||||
default: main
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- main
|
||||
- v0.15.0rc1
|
||||
- v0.14.0rc1
|
||||
- v0.13.0rc2
|
||||
|
||||
jobs:
|
||||
build_and_release_code:
|
||||
@@ -34,7 +45,15 @@ jobs:
|
||||
matrix:
|
||||
python-version: ["3.11"]
|
||||
steps:
|
||||
- uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v4.2.2
|
||||
- name: checkout vllm-ascend
|
||||
if: ${{ github.event_name != 'workflow_dispatch' }}
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: checkout vllm-ascend ${{ inputs.tag }}
|
||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ inputs.tag }}
|
||||
|
||||
- name: Print
|
||||
run: |
|
||||
@@ -76,7 +95,15 @@ jobs:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v4.2.2
|
||||
- name: checkout vllm-ascend
|
||||
if: ${{ github.event_name != 'workflow_dispatch' }}
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: checkout vllm-ascend ${{ inputs.tag }}
|
||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ inputs.tag }}
|
||||
|
||||
- name: Free up disk space
|
||||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
|
||||
@@ -91,8 +118,8 @@ jobs:
|
||||
--build-arg PY_VERSION=${{ matrix.python-version }} \
|
||||
-t wheel:v1 .
|
||||
docker run --rm \
|
||||
-u $(id -u):$(id -g) \
|
||||
-v $(pwd):/outpwd \
|
||||
-u "$(id -u):$(id -g)" \
|
||||
-v "$(pwd):/outpwd" \
|
||||
wheel:v1 \
|
||||
bash -c "cp -r /workspace/vllm-ascend/dist /outpwd"
|
||||
ls dist
|
||||
@@ -147,7 +174,7 @@ jobs:
|
||||
path: dist/*
|
||||
|
||||
- name: Release
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
|
||||
run: |
|
||||
python3 -m pip install twine
|
||||
python3 -m twine upload --verbose dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user