-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 995 Bytes
/
Copy pathcache-uv-build.yaml
File metadata and controls
43 lines (37 loc) · 995 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
34
35
36
37
38
39
40
41
42
43
name: Build uv cache
on:
push:
branches:
- main
paths:
- 'uv.lock'
- 'pyproject.toml'
workflow_dispatch:
jobs:
build-cache:
runs-on: ubuntu-latest
env:
UV_VERSION: '0.9.27'
PYTHON_VERSION: '3.13'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
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@v4
with:
path: |
~/.cache/uv
~/.local/share/uv
.venv
key: uv-main-${{ env.UV_VERSION }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('pyproject.toml', 'uv.lock') }}