This repository has been 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
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- refactor code from nm-cp-assets that gets wheel and tar.gz files into a new action that can be used for that and our nm-upload-assets-to-gcp.yml workflow - correct syntax in the if statement - use nm-actions @v1.0.0
- Loading branch information
Showing
4 changed files
with
56 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
name: cp assets | ||
description: "cp whl and tarfile to Google storage 'neuralmagic-public-pypi/dist'" | ||
inputs: | ||
whl: | ||
description: "the wheel asset file path" | ||
required: true | ||
targz: | ||
description: "the tar.gz asset file path" | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- id: cp_assets | ||
run: | | ||
WHL=$(find assets -type f -name "*nm_vllm*.whl") | ||
WHL_FILE=$(basename ${WHL}) | ||
echo "whl: ${WHL}" | ||
echo "whl_file: ${WHL_FILE}" | ||
TAR=$(find assets -path "*nm-vllm*.tar.gz" -type f -name "nm-vllm*.tar.gz") | ||
TAR_FILE=$(basename ${TAR}) | ||
echo "tar: ${TAR}" | ||
echo "tar_file: ${TAR_FILE}" | ||
gcloud storage cp ${WHL} gs://neuralmagic-public-pypi/dist/${WHL_FILE} | ||
gcloud storage cp ${TAR} gs://neuralmagic-public-pypi/dist/${TAR_FILE} | ||
gcloud storage cp ${WHL} gs://neuralmagic-public-pypi/dist/${{ inputs.whl }} | ||
gcloud storage cp ${TAR} gs://neuralmagic-public-pypi/dist/${{ inputs.targz }} | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: get wheel and tar.gz names | ||
description: "retrieve the whl and tarfile names from existing assets" | ||
outputs: | ||
whl: | ||
description: "the wheel asset file path" | ||
value: ${{ steps.whl_targz_names.outputs.whl }} | ||
targz: | ||
description: "the tar.gz asset file path" | ||
value: ${{ steps.whl_targz_names.outputs.targz }} | ||
runs: | ||
using: composite | ||
steps: | ||
- id: whl_targz_names | ||
run: | | ||
WHL=$(find assets -type f -name "*nm_vllm*.whl") | ||
WHL_FILE=$(basename ${WHL}) | ||
echo "whl: ${WHL}" | ||
echo "whl_file: ${WHL_FILE}" | ||
TAR=$(find assets -path "*nm-vllm*.tar.gz" -type f -name "nm-vllm*.tar.gz") | ||
TAR_FILE=$(basename ${TAR}) | ||
echo "tar: ${TAR}" | ||
echo "tar_file: ${TAR_FILE}" | ||
echo "whl=${WHL_FILE}" >> $GITHUB_OUTPUT | ||
echo "targz=${TAR_FILE}" >> $GITHUB_OUTPUT | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,10 +20,6 @@ on: | |
description: "workflow category: REMOTE, NIGHTLY, RELEASE" | ||
type: string | ||
default: "REMOTE" | ||
whl: | ||
description: "wheel file path" | ||
type: string | ||
required: true | ||
|
||
workflow_dispatch: | ||
inputs: | ||
|
@@ -84,15 +80,29 @@ jobs: | |
with: | ||
path: assets | ||
|
||
- name: get wheel and tar.gz names | ||
id: whl_targz_names | ||
uses: ./.github/actions/nm_whl_tar_gz_names | ||
|
||
# this workflow is only run if push-to-pypi is True, and we only | ||
# want to push RELEASE assets to the external pypi.org | ||
# publish the wheel file | ||
- name: push wheel to pypi.org | ||
# this workflow is only run if push-to-pypi is True, and we only | ||
# want to push RELEASE wheels to the external pypi.org | ||
if: ${{ inputs.wf_category }} == "RELEASE" | ||
uses: neuralmagic/nm-actions/actions/publish_whl/action.yml@main | ||
if: ${{ inputs.wf_category == "RELEASE" }} | ||
uses: neuralmagic/nm-actions/actions/publish_whl/[email protected] | ||
with: | ||
username: ${{ secrets.PYPI_PUBLIC_USER }} | ||
password: ${{ secrets.PYPI_PUBLIC_AUTH }} | ||
whl: ${{ inputs.whl }} | ||
whl: ${{ steps.whl_targz_names.outputs.whl }} | ||
|
||
# publish the tar.gz file | ||
- name: push tar.gz to pypi.org | ||
if: ${{ inputs.wf_category == "RELEASE" }} | ||
uses: neuralmagic/nm-actions/actions/publish_whl/[email protected] | ||
with: | ||
username: ${{ secrets.PYPI_PUBLIC_USER }} | ||
password: ${{ secrets.PYPI_PUBLIC_AUTH }} | ||
whl: ${{ steps.whl_targz_names.outputs.targz }} | ||
|
||
# GCP | ||
- name: 'Authenticate to Google Cloud' | ||
|
@@ -111,6 +121,9 @@ jobs: | |
- name: cp assets | ||
id: cp-assets | ||
uses: ./.github/actions/nm-cp-assets/ | ||
with: | ||
whl: ${{ steps.whl_targz_names.outputs.whl }} | ||
targz: ${{ steps.whl_targz_names.outputs.targz }} | ||
|
||
- name: trigger stratus nm-pypi update workflow to update nm-pypi index | ||
uses: actions/github-script@v6 | ||
|