diff --git a/.github/actions/nm-cp-assets/action.yml b/.github/actions/nm-cp-assets/action.yml new file mode 100644 index 0000000000000..f4ccf88d38ac0 --- /dev/null +++ b/.github/actions/nm-cp-assets/action.yml @@ -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 diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 0e6c41f48576d..4395b58c8ed10 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -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: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 7e8d2a4adc064..daba91a21e58d 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/nm-publish.yml b/.github/workflows/nm-publish.yml deleted file mode 100644 index c4039d78c0ad6..0000000000000 --- a/.github/workflows/nm-publish.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: nm publish whl -run-name: ${{ github.actor }} publishing whl on branch '${{ github.ref}}' -on: - workflow_dispatch: - 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 - whl: - description: "whl to test (variable appears late binding so unusable outside 'download artifact')" - type: string - required: true - tarfile: - description: "source distribution (variable appears late binding so unusable outside 'download artifact')" - type: string - required: true - - 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 - whl: - description: "whl to test (variable appears late binding so unusable outside 'download artifact')" - type: string - required: true - tarfile: - description: "source distribution (variable appears late binding so unusable outside 'download artifact')" - type: string - required: true - -jobs: - - PUBLISH: - runs-on: ${{ inputs.label }} - timeout-minutes: ${{ fromJson(inputs.timeout) }} - - 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: set python - id: set_python - uses: ./.github/actions/nm-set-python/ - with: - python: ${{ inputs.python }} - venv: UPLOAD diff --git a/.github/workflows/nm-upload-assets-to-gcp.yml b/.github/workflows/nm-upload-assets-to-gcp.yml new file mode 100644 index 0000000000000..82c646f0cc904 --- /dev/null +++ b/.github/workflows/nm-upload-assets-to-gcp.yml @@ -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/auth@v2.1.3 + 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 }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index db155ebe56317..8fdc854a8b5c8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 @@ -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 @@ -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