Skip to content

Commit 91ad038

Browse files
committed
add uv update workflow
1 parent fcbdd8d commit 91ad038

8 files changed

+112
-8
lines changed

.github/workflows/build-test-linux-aarch64-jetpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Build and test Linux aarch64 wheels for Jetpack
22

33
on:
4-
pull_request:
4+
#pull_request:
55
push:
66
branches:
77
- main

.github/workflows/build-test-linux-aarch64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Build and test Linux aarch64 wheels
22

33
on:
4-
pull_request:
4+
#pull_request:
55
push:
66
branches:
77
- main

.github/workflows/build-test-linux-x86_64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Build and test Linux x86_64 wheels
22

33
on:
4-
pull_request:
4+
#pull_request:
55
push:
66
branches:
77
- main

.github/workflows/build-test-linux-x86_64_rtx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: RTX - Build and test Linux x86_64 wheels
22

33
on:
4-
pull_request:
4+
#pull_request:
55
push:
66
branches:
77
- main

.github/workflows/build-test-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Build and test Windows wheels
22

33
on:
4-
pull_request:
4+
#pull_request:
55
push:
66
branches:
77
- main

.github/workflows/build-test-windows_rtx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: RTX - Build and test Windows wheels
22

33
on:
4-
pull_request:
4+
#pull_request:
55
push:
66
branches:
77
- main

.github/workflows/uv-update.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Sync uv.lock
2+
3+
on:
4+
# this is for test_only
5+
pull_request:
6+
schedule:
7+
# Every Monday at 03:00 UTC; adjust as needed
8+
- cron: "0 3 * * 1"
9+
push:
10+
branches: [main]
11+
paths:
12+
- 'pyproject.toml'
13+
- 'setup.py'
14+
workflow_dispatch: # allow manual runs
15+
16+
permissions:
17+
contents: read
18+
pull-requests: read
19+
20+
jobs:
21+
sync-uv-lock:
22+
# runs-on: ubuntu-latest
23+
runs-on: linux.g5.4xlarge.nvidia.gpu
24+
container:
25+
image: pytorch/manylinux2_28-builder:cuda13.0
26+
options: --gpus all
27+
env:
28+
CUDA_VERSION: 13.0
29+
CUDA_HOME: /usr/local/cuda
30+
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
with:
35+
fetch-depth: 0
36+
token: ${{ secrets.UV_LOCK_PR_TOKEN }}
37+
38+
- name: Install uv
39+
uses: astral-sh/setup-uv@v3
40+
with:
41+
version: "latest"
42+
43+
- name: Install bazel
44+
run: |
45+
set -euo pipefail
46+
set -x
47+
curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.26.0/bazelisk-linux-amd64 \
48+
-o bazelisk-linux-amd64 \
49+
&& mv bazelisk-linux-amd64 /usr/local/bin/bazel \
50+
&& chmod +x /usr/local/bin/bazel
51+
bazel --version
52+
53+
- name: UV lock and check for changes
54+
id: check-changes
55+
working-directory: ${{ github.workspace }}
56+
run: |
57+
set -euo pipefail
58+
set -x
59+
git config --global safe.directory "$GITHUB_WORKSPACE"
60+
61+
if ! uv lock; then
62+
echo "Error: Failed to update uv.lock"
63+
exit 1
64+
fi
65+
echo "successfully ran uv lock"
66+
if git diff --quiet uv.lock; then
67+
echo "No changes to uv.lock"
68+
exit 0
69+
fi
70+
echo "has_changes=true" >> "$GITHUB_OUTPUT"
71+
echo "there is changes to the uv.lock file"
72+
73+
- name: Create Pull Request
74+
if: steps.check-changes.outputs.has_changes == 'true'
75+
uses: peter-evans/create-pull-request@v5
76+
with:
77+
token: ${{ secrets.UV_LOCK_PR_TOKEN }}
78+
commit-message: "chore: update uv.lock"
79+
base: ${{ github.event_name == 'pull_request' && github.base_ref || github.ref_name }}
80+
title: "uv.lock file updates"
81+
body: |
82+
## Summary
83+
Automated update of UV lockfiles to ensure all dependencies are current.
84+
85+
### Changes include:
86+
- Updated dependency versions in `uv.lock`
87+
88+
### Next Steps:
89+
- Review the updated dependencies
90+
- Run CI to ensure no breaking changes
91+
- Merge if all tests pass
92+
93+
---
94+
95+
*Auto-generated by [uv-update](.github/workflows/uv-update.yml) workflow*
96+
branch: "update/uv-lockfiles-${{ github.run_id }}"
97+
delete-branch: true
98+
assignees: ""
99+
reviewers: ""
100+
draft: false
101+
102+
concurrency:
103+
group: ${{ github.workflow }}-uv-update-${{ github.event.pull_request.number || github.ref_name }}-${{ github.event_name == 'workflow_dispatch' }}
104+
cancel-in-progress: true

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ requires = [
77
"pyyaml>=6.0",
88
"cffi>=1.15.1",
99
"torch>=2.10.0.dev,<2.11.0",
10-
"pybind11==2.6.2",
10+
"pybind11==2.6.2"
1111
]
1212
build-backend = "setuptools.build_meta"
1313

@@ -32,7 +32,7 @@ classifiers = [
3232
"Topic :: Software Development :: Libraries",
3333
]
3434
readme = { file = "README.md", content-type = "text/markdown" }
35-
requires-python = ">=3.10"
35+
requires-python = ">=3.11"
3636
keywords = [
3737
"pytorch",
3838
"torch",

0 commit comments

Comments
 (0)