From 3940ea9af1cf566acb86113e0f66566b01fa56de Mon Sep 17 00:00:00 2001 From: harrisonyhq Date: Thu, 25 Sep 2025 15:53:11 +0800 Subject: [PATCH] [Fix] Fix workflow image space error in action --- .github/workflows/unifiedcache_test.yml | 67 +++++++++---------------- 1 file changed, 24 insertions(+), 43 deletions(-) diff --git a/.github/workflows/unifiedcache_test.yml b/.github/workflows/unifiedcache_test.yml index 6ea76599..ba5d5925 100644 --- a/.github/workflows/unifiedcache_test.yml +++ b/.github/workflows/unifiedcache_test.yml @@ -1,4 +1,4 @@ -name: 'test' +name: 'ucm-lint-and-unittest' on: push: @@ -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 + "