Skip to content

Commit c6bf398

Browse files
authored
[Fix] fix workflow space error (#206)
1 parent 059931d commit c6bf398

File tree

1 file changed

+24
-43
lines changed

1 file changed

+24
-43
lines changed
Lines changed: 24 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'test'
1+
name: 'ucm-lint-and-unittest'
22

33
on:
44
push:
@@ -20,52 +20,33 @@ jobs:
2020
needs: call-lint
2121
name: Run Unittests
2222
runs-on: ubuntu-latest
23-
container:
24-
image: vllm/vllm-openai:v0.9.2
25-
env:
26-
VLLM_USE_PRECOMPILED: 1
27-
PLATFORM: cuda
2823
steps:
29-
- name: Install system deps
24+
- name: Free disk space
3025
run: |
31-
apt-get update -y
32-
apt-get install -y python3-pip git build-essential
26+
sudo rm -rf /usr/share/dotnet
27+
sudo rm -rf /opt/ghc
28+
sudo rm -rf "/usr/local/share/boost"
29+
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
30+
docker system prune -af
31+
df -h
3332
34-
- name: Clone vLLM
35-
run: |
36-
git clone --depth 1 --branch v0.9.2 \
37-
https://github.com/vllm-project/vllm.git \
38-
/vllm-workspace/vllm
39-
40-
- name: Install vLLM (CPU)
41-
working-directory: /vllm-workspace/vllm
42-
run: |
43-
pip uninstall -y vllm
44-
VLLM_TARGET_DEVICE=empty \
45-
pip install -v -e . \
46-
--extra-index-url https://download.pytorch.org/whl/cpu/
47-
4833
- name: Checkout unified-cache-management repo
4934
uses: actions/checkout@v4
50-
51-
- name: Print debug info
52-
run: |
53-
echo "GITHUB_WORKSPACE is $GITHUB_WORKSPACE"
54-
ls -l $GITHUB_WORKSPACE/ucm/patch
5535

56-
- name: Debug repo layout
57-
run: |
58-
echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE"
59-
find "$GITHUB_WORKSPACE" -type f -name "*.patch"
60-
ls -l "$GITHUB_WORKSPACE"
61-
- name: Apply patch
36+
- name: Run unit test inside vLLM container
6237
run: |
63-
git -C /vllm-workspace/vllm apply $GITHUB_WORKSPACE/ucm/patch/0.9.2/vllm-adapt.patch
64-
65-
66-
- name: Install unified-cache-management
67-
run: pip install -v -e . --no-build-isolation
68-
69-
- name: Run ut
70-
run: python3 -m unittest discover -s test
71-
38+
docker run --rm \
39+
-e VLLM_USE_PRECOMPILED=1 \
40+
-e PLATFORM=cuda \
41+
-v ${{ github.workspace }}:/workspace/unified-cache-management \
42+
-w /workspace/unified-cache-management \
43+
--entrypoint /bin/bash \
44+
vllm/vllm-openai:v0.9.2 \
45+
-c "
46+
pip install -v -e . --no-build-isolation
47+
cd \$(pip show vllm | grep Location | awk '{print \$2}') &&
48+
git apply /workspace/unified-cache-management/ucm/patch/0.9.2/vllm-adapt.patch &&
49+
git apply /workspace/unified-cache-management/ucm/patch/0.9.2/vllm-adapt-sparse.patch
50+
cd /workspace/unified-cache-management
51+
python3 -m unittest discover -s test
52+
"

0 commit comments

Comments
 (0)