|
| 1 | +name: debug workflow |
| 2 | +on: |
| 3 | + |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - infraupdate |
| 7 | + |
| 8 | + # makes workflow manually callable |
| 9 | + workflow_dispatch: |
| 10 | + inputs: |
| 11 | + gitref: |
| 12 | + description: "git commit hash or branch name" |
| 13 | + type: string |
| 14 | + required: true |
| 15 | + test_label: |
| 16 | + description: "requested runner label" |
| 17 | + type: string |
| 18 | + required: true |
| 19 | + python: |
| 20 | + description: "python version, e.g. 3.10.12" |
| 21 | + type: string |
| 22 | + required: true |
| 23 | + timeout: |
| 24 | + description: "time limit for run in minutes " |
| 25 | + type: string |
| 26 | + required: true |
| 27 | + run_id: |
| 28 | + description: run id of the BUILD job that generated the assets |
| 29 | + type: string |
| 30 | + |
| 31 | +jobs: |
| 32 | + |
| 33 | + DEBUG: |
| 34 | + |
| 35 | + name: DEBUG (${{ inputs.python}}, ${{ inputs.test_label }}) |
| 36 | + runs-on: ${{ inputs.test_label || 'gcp-k8s-vllm-util' }} |
| 37 | + timeout-minutes: ${{ fromJson('60') }} |
| 38 | + permissions: |
| 39 | + contents: 'read' |
| 40 | + id-token: 'write' |
| 41 | + env: |
| 42 | + HF_HOME: /model-cache |
| 43 | + HF_TOKEN: ${{ secrets.HF_RED_HAT_READ_ONLY }} |
| 44 | + PYTHON_VERSION: ${{ inputs.python || '3.12' }} |
| 45 | + GITREF: ${{ inputs.gitref || 'main' }} |
| 46 | + RUNID: ${{ inputs.run_id || '18690758970' }} |
| 47 | + |
| 48 | + steps: |
| 49 | + |
| 50 | + - name: set python |
| 51 | + id: set_python |
| 52 | + uses: actions/setup-python@v6 |
| 53 | + with: |
| 54 | + python-version: ${{ env.PYTHON_VERSION }} |
| 55 | + |
| 56 | + - name: verify python |
| 57 | + id: verify_python |
| 58 | + uses: neuralmagic/nm-actions/actions/[email protected] |
| 59 | + with: |
| 60 | + python-version: ${{ env.PYTHON_VERSION }} |
| 61 | + |
| 62 | + - name: install system dependencies |
| 63 | + run: |- |
| 64 | + sudo apt-get update |
| 65 | + sudo apt-get install -y --no-install-recommends g++ gcc make |
| 66 | + shell: bash |
| 67 | + |
| 68 | + - name: checkout code |
| 69 | + id: checkout |
| 70 | + uses: actions/checkout@v4 |
| 71 | + with: |
| 72 | + ref: ${{ env.GITREF }} |
| 73 | + |
| 74 | + - name: create virtualenv |
| 75 | + id: create_venv |
| 76 | + uses: neuralmagic/nm-actions/actions/[email protected] |
| 77 | + with: |
| 78 | + venv: TEST |
| 79 | + |
| 80 | + # GCP |
| 81 | + - name: 'Authenticate to Google Cloud' |
| 82 | + id: auth |
| 83 | + uses: google-github-actions/[email protected] |
| 84 | + with: |
| 85 | + project_id: ${{ secrets.GCP_VLLM_PROJECT }} |
| 86 | + workload_identity_provider: ${{ secrets.GCP_VLLM_PROJECT_WORKLOAD_IDENTITY_PROVIDER }} |
| 87 | + service_account: ${{ secrets.GCP_VLLM_PROJECT_GHA_SA }} |
| 88 | + |
| 89 | + - name: 'Set up Cloud SDK' |
| 90 | + uses: 'google-github-actions/setup-gcloud@v2' |
| 91 | + with: |
| 92 | + version: '>= 473.0.0' |
| 93 | + |
| 94 | + - name: download assets |
| 95 | + if: ${{ env.RUNID != '' }} |
| 96 | + uses: neuralmagic/nm-actions/actions/[email protected] |
| 97 | + with: |
| 98 | + bucket_source: ${{ secrets.GCP_VLLM_PROJECT_BUILD_ASSETS }} |
| 99 | + run_id: ${{ env.RUNID }} |
| 100 | + |
| 101 | + - name: Wait for debugging |
| 102 | + run: | |
| 103 | + echo "⏳ Waiting forever until the job times out..." |
| 104 | + while true; do |
| 105 | + sleep 60s |
| 106 | + done |
0 commit comments