mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2026-01-13 09:30:34 +08:00
[ci] improve cuda ci cache (#9725)
Co-authored-by: frozenleaves <frozen@Mac.local>
This commit is contained in:
22
.github/workflows/tests_cuda.yml
vendored
22
.github/workflows/tests_cuda.yml
vendored
@@ -35,6 +35,11 @@ jobs:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.python }}
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.python }}
|
||||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
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:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -55,35 +60,18 @@ jobs:
|
|||||||
uv pip install -e .
|
uv pip install -e .
|
||||||
uv pip install -r requirements/dev.txt
|
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
|
- name: Check quality
|
||||||
run: |
|
run: |
|
||||||
make style && make quality
|
make style && make quality
|
||||||
env:
|
|
||||||
UV_NO_SYNC: 1
|
|
||||||
|
|
||||||
- name: Check license
|
- name: Check license
|
||||||
run: |
|
run: |
|
||||||
make license
|
make license
|
||||||
env:
|
|
||||||
UV_NO_SYNC: 1
|
|
||||||
|
|
||||||
- name: Check build
|
- name: Check build
|
||||||
run: |
|
run: |
|
||||||
make build
|
make build
|
||||||
env:
|
|
||||||
UV_NO_SYNC: 1
|
|
||||||
|
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
make test
|
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' }}"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user