From d43e1007e80623c087412191cbbfeaacd6069d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=AE=E6=A2=A6?= <46097299+frozenleaves@users.noreply.github.com> Date: Wed, 7 Jan 2026 12:34:40 +0800 Subject: [PATCH] [ci] improve cuda ci cache (#9725) Co-authored-by: frozenleaves --- .github/workflows/tests_cuda.yml | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/.github/workflows/tests_cuda.yml b/.github/workflows/tests_cuda.yml index 53548f509..7b2bf78ba 100644 --- a/.github/workflows/tests_cuda.yml +++ b/.github/workflows/tests_cuda.yml @@ -35,6 +35,11 @@ jobs: group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.python }} cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + env: + HF_HOME: "${{ github.workspace }}/../.runner_cache/huggingface" + UV_CACHE_DIR: "${{ github.workspace }}/../.runner_cache/uv" + UV_NO_SYNC: 1 + steps: - name: Checkout uses: actions/checkout@v4 @@ -55,35 +60,18 @@ jobs: uv pip install -e . uv pip install -r requirements/dev.txt - - name: Cache files - id: hf-hub-cache - uses: actions/cache@v4 - with: - path: ${{ runner.temp }}/huggingface - key: huggingface-${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('tests/version.txt') }} - - name: Check quality run: | make style && make quality - env: - UV_NO_SYNC: 1 - name: Check license run: | make license - env: - UV_NO_SYNC: 1 - name: Check build run: | make build - env: - UV_NO_SYNC: 1 - name: Test with pytest run: | make test - env: - UV_NO_SYNC: 1 - HF_HOME: ${{ runner.temp }}/huggingface - HF_HUB_OFFLINE: "${{ steps.hf-hub-cache.outputs.cache-hit == 'true' && '1' || '0' }}"