This repository was archived by the owner on Oct 11, 2024. It is now read-only.
forked from vllm-project/vllm
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathaction.yml
48 lines (48 loc) · 1.58 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: build nm-vllm whl
description: 'build whl file of nm-vllm'
inputs:
python:
description: 'python version, e.g. 3.10.12'
required: true
venv:
description: 'name for python virtual environment'
required: true
outputs:
status:
description: "final build status from 'pip3 wheel dist .'"
value: ${{ steps.whl.outputs.status }}
whl:
description: 'basename for generated whl'
value: ${{ steps.whl.outputs.whl }}
tarball:
description: 'basename for generated tarball'
value: ${{ steps.whl.outputs.tarball }}
artifact:
description: 'artifact name'
value: ${{ steps.whl.outputs.artifact }}
runs:
using: composite
steps:
- id: whl
run: |
COMMIT=${{ github.sha }}
VENV="${{ inputs.venv }}-${COMMIT:0:7}"
source $(pyenv root)/versions/${{ inputs.python }}/envs/${VENV}/bin/activate
SUCCESS=0
pip3 wheel --no-deps -w dist . || SUCCESS=$?
ls -alh dist/
BASE=$(./.github/scripts/convert-version ${{ inputs.python }})
WHL_FILEPATH=$(find dist -iname "*nm_vllm*${BASE}*.whl")
WHL=$(basename ${WHL_FILEPATH})
echo "whl=${WHL}" >> "$GITHUB_OUTPUT"
# generate .tar.gz
$SUCCESS || python3 setup.py sdist || SUCCESS=$?
ls -alh dist/
TARBALL_FILEPATH=$(find dist -iname "*nm-vllm*.tar.gz")
TARBALL=$(basename ${TARBALL_FILEPATH})
echo "status=${SUCCESS}" >> "$GITHUB_OUTPUT"
echo "tarball=${TARBALL}" >> "$GITHUB_OUTPUT"
ARTIFACT=`echo "${WHL}" | sed 's/.whl//g'`
echo "artifact=${ARTIFACT}" >> "$GITHUB_OUTPUT"
exit ${SUCCESS}
shell: bash