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
168 lines (151 loc) · 5.76 KB
/
build-test.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: build-test
on:
# makes workflow reusable
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
Gi_per_thread:
description: 'requested GiB to reserve per thread'
type: string
required: true
python:
description: "python version, e.g. 3.10.12"
type: string
required: true
# makes workflow manually callable
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
Gi_per_thread:
description: 'requested GiB to reserve per thread'
type: string
required: true
python:
description: "python version, e.g. 3.10.12"
type: string
required: true
jobs:
BUILD-TEST:
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/
with:
hf_token: ${{ secrets.NM_HF_TOKEN }}
Gi_per_thread: ${{ inputs.Gi_per_thread }}
- name: set python
id: set_python
uses: ./.github/actions/nm-set-python/
with:
python: ${{ inputs.python }}
venv: TEST
- name: hf cache
id: hf_cache
uses: ./.github/actions/nm-hf-cache/
with:
fs_cache: ${{ secrets.HF_FS_CACHE }}
# TODO: testmo source is currently hardcoded.
- name: create testmo run
id: create_testmo_run
uses: ./.github/actions/nm-testmo-run-create/
if: success() || failure()
with:
testmo_url: https://neuralmagic.testmo.net
testmo_token: ${{ secrets.TESTMO_TEST_TOKEN }}
source: 'build-test'
- name: python lint
id: lint
uses: ./.github/actions/nm-lint-python/
- name: build
id: build
uses: ./.github/actions/nm-build-vllm/
with:
Gi_per_thread: ${{ inputs.Gi_per_thread }}
python: ${{ inputs.python }}
venv: TEST
pypi: ${{ secrets.NM_PRIVATE_PYPI_LOCATION }}
- name: test
id: test
uses: ./.github/actions/nm-test-vllm/
with:
test_directory: tests
test_results: test-results
python: ${{ inputs.python }}
venv: TEST
pypi: ${{ secrets.NM_PRIVATE_PYPI_LOCATION }}
- name: report test results
id: report_test
uses: ./.github/actions/nm-testmo-run-submit-thread/
if: success() || failure()
with:
testmo_url: https://neuralmagic.testmo.net
testmo_token: ${{ secrets.TESTMO_TEST_TOKEN }}
testmo_run_id: ${{ steps.create_testmo_run.outputs.id }}
results: test-results
step_status: ${{ steps.test.outputs.status }}
- name: summary
uses: ./.github/actions/nm-run-summary/
if: success() || failure()
with:
label: ${{ inputs.label }}
gitref: ${{ inputs.gitref }}
testmo_run_url: https://neuralmagic.testmo.net/automation/runs/view/${{ steps.create_testmo_run.outputs.id }}
python: ${{ steps.set_python.outputs.version }}
lint_status: ${{ steps.lint.outputs.status }}
build_status: ${{ steps.build.outputs.status }}
test_status: ${{ steps.test.outputs.status }}
- name: run status
id: run_status
if: success() || failure()
env:
CHECKOUT: ${{ steps.checkout.outcome }}
LINT_STATUS: ${{ steps.lint.outputs.status }}
BUILD_STATUS: ${{ steps.build.outputs.status }}
TEST_STATUS: ${{ steps.test.outputs.status }}
run: |
echo "checkout status: ${CHECKOUT}"
echo "lint status: ${LINT_STATUS}"
echo "build status: ${BUILD_STATUS}"
echo "test status: ${TEST_STATUS}"
if [[ "${CHECKOUT}" != *"success"* ]]; then exit 1; fi
if [ -z "${LINT_STATUS}" ] || [ "${LINT_STATUS}" -ne "0" ]; then exit 1; fi
if [ -z "${BUILD_STATUS}" ] || [ "${BUILD_STATUS}" -ne "0" ]; then exit 1; fi
if [ -z "${TEST_STATUS}" ] || [ "${TEST_STATUS}" -ne "0" ]; then exit 1; fi
- name: complete testmo run
uses: ./.github/actions/nm-testmo-run-complete/
if: success() || failure()
with:
testmo_url: https://neuralmagic.testmo.net
testmo_token: ${{ secrets.TESTMO_TEST_TOKEN }}
testmo_run_id: ${{ steps.create_testmo_run.outputs.id }}