-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 927 Bytes
/
Copy pathcache-uv-build.yaml
File metadata and controls
33 lines (31 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Build uv cache (Reusable)
on:
workflow_call:
jobs:
build-cache:
runs-on: ubuntu-latest
env:
UV_VERSION: '0.10.8'
PYTHON_VERSION: '3.13'
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}
enable-cache: false
- name: Install dependencies and populate cache
run: |
echo "Building global UV cache..."
uv sync
echo "Cache populated successfully"
- name: Save uv caches
uses: actions/cache/save@v5
with:
path: |
~/.cache/uv
~/.local/share/uv
.venv
key: uv-${{ github.ref_name }}-${{ env.UV_VERSION }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('pyproject.toml', 'uv.lock') }}