@@ -12,7 +12,7 @@ concurrency:
12
12
cancel-in-progress : true
13
13
14
14
jobs :
15
- pre_merge_hpu_test :
15
+ pre_merge_hpu_test_build :
16
16
runs-on : ucb-vllm-cicd-g2
17
17
permissions :
18
18
contents : read # Required to checkout code and read history
@@ -73,15 +73,42 @@ jobs:
73
73
74
74
EOF
75
75
echo "Docker image built successfully."
76
+ hpu_unit_tests :
77
+ runs-on : ucb-vllm-cicd-g2
78
+ needs : pre_merge_hpu_test_build
79
+ steps :
80
+ - name : Run pytest in tests/unit_tests
81
+ run : |
82
+ EXITCODE=1
83
+ remove_docker_containers() { docker rm -f hpu-plugin-v1-test-unit-tests || true; }
84
+ trap 'remove_docker_containers; exit $EXITCODE;' EXIT
85
+ remove_docker_containers
76
86
87
+ echo "Running HPU plugin v1 unit tests"
88
+ docker run --rm --runtime=habana --name=hpu-plugin-v1-test-unit-tests --network=host \
89
+ -e HABANA_VISIBLE_DEVICES=all \
90
+ -e HF_HOME=/workspace/hf_cache \
91
+ -v /mnt/hf_cache:/workspace/hf_cache \
92
+ hpu-plugin-v1-test-env-pre-merge \
93
+ /bin/bash -c "pytest -vvv /workspace/vllm-gaudi/tests/unit_tests"
94
+
95
+ EXITCODE=$?
96
+ echo "Test script exited with code: $EXITCODE"
97
+
98
+ hpu_e2e_tests :
99
+ runs-on : ucb-vllm-cicd-g2
100
+ # This is a final job that runs after the build and unit tests
101
+ # Unit tests are supposed to fail fast if anything goes wrong, removing the need for this job to run.
102
+ needs : [pre_merge_hpu_test_build, hpu_unit_tests]
103
+ steps :
77
104
- name : Run test scripts
78
105
run : |
79
106
EXITCODE=1
80
- remove_docker_containers() { docker rm -f hpu-plugin-v1-test-pre-merge || true; }
107
+ remove_docker_containers() { docker rm -f hpu-plugin-v1-e2e-tests || true; }
81
108
trap 'remove_docker_containers; exit $EXITCODE;' EXIT
82
109
remove_docker_containers
83
110
84
- echo "Running HPU plugin v1 test "
111
+ echo "Running HPU plugin v1 e2e tests "
85
112
docker run --rm --runtime=habana --name=hpu-plugin-v1-test-pre-merge --network=host \
86
113
-e HABANA_VISIBLE_DEVICES=all \
87
114
-e HF_HOME=/workspace/hf_cache \
@@ -91,3 +118,11 @@ jobs:
91
118
92
119
EXITCODE=$?
93
120
echo "Test script exited with code: $EXITCODE"
121
+
122
+ pre_merge_hpu_test :
123
+ runs-on : ucb-vllm-cicd-g2
124
+ needs : [hpu_unit_tests, hpu_e2e_tests]
125
+ # This job is required to pass for pre-merge CI. By itself it does nothing, and will only pass if all jobs specified in "needs" list pass.
126
+ steps :
127
+ - name : Succeeded if all previous jobs passed
128
+ run : echo "All previous jobs passed."
0 commit comments