Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 24 additions & 43 deletions .github/workflows/unifiedcache_test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'test'
name: 'ucm-lint-and-unittest'

on:
push:
Expand All @@ -20,52 +20,33 @@ jobs:
needs: call-lint
name: Run Unittests
runs-on: ubuntu-latest
container:
image: vllm/vllm-openai:v0.9.2
env:
VLLM_USE_PRECOMPILED: 1
PLATFORM: cuda
steps:
- name: Install system deps
- name: Free disk space
run: |
apt-get update -y
apt-get install -y python3-pip git build-essential
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
docker system prune -af
df -h

- name: Clone vLLM
run: |
git clone --depth 1 --branch v0.9.2 \
https://github.com/vllm-project/vllm.git \
/vllm-workspace/vllm

- name: Install vLLM (CPU)
working-directory: /vllm-workspace/vllm
run: |
pip uninstall -y vllm
VLLM_TARGET_DEVICE=empty \
pip install -v -e . \
--extra-index-url https://download.pytorch.org/whl/cpu/

- name: Checkout unified-cache-management repo
uses: actions/checkout@v4

- name: Print debug info
run: |
echo "GITHUB_WORKSPACE is $GITHUB_WORKSPACE"
ls -l $GITHUB_WORKSPACE/ucm/patch

- name: Debug repo layout
run: |
echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE"
find "$GITHUB_WORKSPACE" -type f -name "*.patch"
ls -l "$GITHUB_WORKSPACE"
- name: Apply patch
- name: Run unit test inside vLLM container
run: |
git -C /vllm-workspace/vllm apply $GITHUB_WORKSPACE/ucm/patch/0.9.2/vllm-adapt.patch


- name: Install unified-cache-management
run: pip install -v -e . --no-build-isolation

- name: Run ut
run: python3 -m unittest discover -s test

docker run --rm \
-e VLLM_USE_PRECOMPILED=1 \
-e PLATFORM=cuda \
-v ${{ github.workspace }}:/workspace/unified-cache-management \
-w /workspace/unified-cache-management \
--entrypoint /bin/bash \
vllm/vllm-openai:v0.9.2 \
-c "
pip install -v -e . --no-build-isolation
cd \$(pip show vllm | grep Location | awk '{print \$2}') &&
git apply /workspace/unified-cache-management/ucm/patch/0.9.2/vllm-adapt.patch &&
git apply /workspace/unified-cache-management/ucm/patch/0.9.2/vllm-adapt-sparse.patch
cd /workspace/unified-cache-management
python3 -m unittest discover -s test
"