Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

upload NIGHTLY assets to GCP #286

Merged
merged 9 commits into from
Jun 7, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/actions/nm-cp-assets/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: cp assets
description: "cp whl and tarfile to Google storage 'neuralmagic-public-pypi/dist'"
inputs:
python:
description: 'python version, e.g. 3.10.12'
required: true
runs:
using: composite
steps:
- id: mv_assets
run: |
VERSION_BASE=$(./.github/scripts/convert-version ${{ inputs.python }})
WHL=$(find assets -type f -name "*nm_vllm*${VERSION_BASE}*.whl")
WHL_FILE=$(basename ${WHL})
echo "whl: ${WHL}"
echo "whl_file: ${WHL_FILE}"
TAR=$(find assets -path "*${{ inputs.python }}-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}
shell: bash
34 changes: 17 additions & 17 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,29 +94,29 @@ jobs:
test_skip_list: ${{ inputs.test_skip_list }}
secrets: inherit

TEST-MULTI:
needs: [BUILD]
if: success() && contains(fromJSON('["NIGHTLY", "WEEKLY", "RELEASE"]'), inputs.wf_category)
uses: ./.github/workflows/test.yml
with:
test_label: ${{ inputs.test_label_multi }}
timeout: ${{ inputs.test_timeout }}
gitref: ${{ github.ref }}
python: ${{ inputs.python }}
whl: ${{ needs.BUILD.outputs.whl }}
test_skip_list: ${{ inputs.test_skip_list }}
secrets: inherit
# TODO: re-enable
# TEST-MULTI:
# needs: [BUILD]
# if: success() && contains(fromJSON('["NIGHTLY", "WEEKLY", "RELEASE"]'), inputs.wf_category)
# uses: ./.github/workflows/test.yml
# with:
# test_label: ${{ inputs.test_label_multi }}
# timeout: ${{ inputs.test_timeout }}
# gitref: ${{ github.ref }}
# python: ${{ inputs.python }}
# whl: ${{ needs.BUILD.outputs.whl }}
# test_skip_list: ${{ inputs.test_skip_list }}
# secrets: inherit

PUBLISH:
needs: [TEST-SOLO, TEST-MULTI]
uses: ./.github/workflows/nm-publish.yml
UPLOAD:
needs: [TEST-SOLO]
if: contains(fromJSON('["NIGHTLY", "WEEKLY", "RELEASE"]'), inputs.wf_category)
uses: ./.github/workflows/nm-upload-assets-to-gcp.yml
with:
label: ${{ inputs.build_label }}
timeout: ${{ inputs.build_timeout }}
gitref: ${{ github.ref }}
python: ${{ inputs.python }}
whl: ${{ needs.BUILD.outputs.whl }}
tarfile: ${{ needs.BUILD.outputs.tarfile }}
secrets: inherit

BENCHMARK:
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
test_label_solo: aws-test-a10g-24G
test_label_multi: ignore
test_timeout: 480
test_skip_list: neuralmagic/tests/skip-for-nightly.txt
test_skip_list: neuralmagic/tests/skip-for-remote-push-tmp.txt

benchmark_label: aws-test-a10g-24G
benchmark_config_list_file: ./.github/data/nm_benchmark_nightly_configs_list.txt
benchmark_config_list_file: ./.github/data/nm_benchmark_remote_push_configs_list.txt
benchmark_timeout: 720
push_benchmark_results_to_gh_pages: "${{ github.event_name == 'schedule' || inputs.push_benchmark_results_to_gh_pages }}"
secrets: inherit
Expand All @@ -45,10 +45,10 @@ jobs:
test_label_solo: aws-test-a10g-24G
test_label_multi: ignore
test_timeout: 480
test_skip_list: neuralmagic/tests/skip-for-nightly.txt
test_skip_list: neuralmagic/tests/skip-for-remote-push-tmp.txt

benchmark_label: aws-test-a10g-24G
benchmark_config_list_file: ./.github/data/nm_benchmark_nightly_configs_list.txt
benchmark_config_list_file: ./.github/data/nm_benchmark_remote_push_configs_list.txt
benchmark_timeout: 720
push_benchmark_results_to_gh_pages: "${{ github.event_name == 'schedule' || inputs.push_benchmark_results_to_gh_pages }}"
secrets: inherit
Expand All @@ -60,13 +60,13 @@ jobs:
python: 3.10.12
gitref: ${{ github.ref }}

test_label_solo: aws-test-a10g-24G
test_label_multi: aws-test-4-a10g-96G
test_label_solo: aws-avx2-32G-a10g-24G
test_label_multi: ignore
test_timeout: 480
test_skip_list: neuralmagic/tests/skip-for-nightly.txt
test_skip_list: neuralmagic/tests/skip-for-remote-push-tmp.txt

benchmark_label: aws-test-a10g-24G
benchmark_config_list_file: ./.github/data/nm_benchmark_nightly_configs_list.txt
benchmark_config_list_file: ./.github/data/nm_benchmark_remote_push_configs_list.txt
benchmark_timeout: 720
push_benchmark_results_to_gh_pages: "${{ github.event_name == 'schedule' || inputs.push_benchmark_results_to_gh_pages }}"
secrets: inherit
Expand All @@ -81,10 +81,10 @@ jobs:
test_label_solo: aws-test-a10g-24G
test_label_multi: ignore
test_timeout: 480
test_skip_list: neuralmagic/tests/skip-for-nightly.txt
test_skip_list: neuralmagic/tests/skip-for-remote-push-tmp.txt

benchmark_label: aws-test-a10g-24G
benchmark_config_list_file: ./.github/data/nm_benchmark_nightly_configs_list.txt
benchmark_config_list_file: ./.github/data/nm_benchmark_remote_push_configs_list.txt
benchmark_timeout: 720
push_benchmark_results_to_gh_pages: "${{ github.event_name == 'schedule' || inputs.push_benchmark_results_to_gh_pages }}"
secrets: inherit
83 changes: 0 additions & 83 deletions .github/workflows/nm-publish.yml

This file was deleted.

72 changes: 72 additions & 0 deletions .github/workflows/nm-upload-assets-to-gcp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: nm upload assets to GCP
run-name: ${{ github.actor }} publishing whl on branch '${{ github.ref}}'
on:

workflow_call:
inputs:
label:
description: "requested runner label (specifies instance)"
type: string
required: true
timeout:
description: "time limit for run in minutes "
type: string
required: true
gitref:
description: 'git commit hash or branch name'
type: string
required: true
python:
description: "python version, e.g. 3.10.12"
type: string
required: true

jobs:

PUBLISH:
runs-on: ${{ inputs.label }}
timeout-minutes: ${{ fromJson(inputs.timeout) }}

permissions:
contents: 'read'
id-token: 'write'

steps:

- name: checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.gitref }}
submodules: recursive

- name: setenv
id: setenv
uses: ./.github/actions/nm-set-env/

- name: download assets
id: download_whl
uses: actions/download-artifact@v4
with:
path: assets

# GCP
- name: 'Authenticate to Google Cloud'
id: auth
uses: google-github-actions/[email protected]
with:
project_id: ${{ secrets.GCP_PROJECT }}
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GCP_SA }}

- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
with:
version: '>= 473.0.0'

- name: cp assets
id: cp-assets
uses: ./.github/actions/nm-cp-assets/
with:
python: ${{ inputs.python }}
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
gitref: ${{ github.ref }}

test_label_solo: aws-test-a10g-24G
test_label_multi: aws-test-4-a10g-96G
test_label_multi: ignore
test_timeout: 720
test_skip_list: neuralmagic/tests/skip-for-release.txt

Expand All @@ -39,7 +39,7 @@ jobs:
gitref: ${{ github.ref }}

test_label_solo: aws-test-a10g-24G
test_label_multi: aws-test-4-a10g-96G
test_label_multi: ignore
test_timeout: 720
test_skip_list: neuralmagic/tests/skip-for-release.txt

Expand All @@ -57,7 +57,7 @@ jobs:
gitref: ${{ github.ref }}

test_label_solo: aws-test-a10g-24G
test_label_multi: aws-test-4-a10g-96G
test_label_multi: ignore
test_timeout: 720
test_skip_list: neuralmagic/tests/skip-for-release.txt

Expand All @@ -75,7 +75,7 @@ jobs:
gitref: ${{ github.ref }}

test_label_solo: aws-test-a10g-24G
test_label_multi: aws-test-4-a10g-96G
test_label_multi: ignore
test_timeout: 720
test_skip_list: neuralmagic/tests/skip-for-release.txt

Expand Down
Loading