Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-test-linux-aarch64-jetpack.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build and test Linux aarch64 wheels for Jetpack

on:
pull_request:
#pull_request:
push:
branches:
- main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-linux-aarch64.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build and test Linux aarch64 wheels

on:
pull_request:
#pull_request:
push:
branches:
- main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-linux-x86_64.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build and test Linux x86_64 wheels

on:
pull_request:
#pull_request:
push:
branches:
- main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-linux-x86_64_rtx.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: RTX - Build and test Linux x86_64 wheels

on:
pull_request:
#pull_request:
push:
branches:
- main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-windows.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build and test Windows wheels

on:
pull_request:
#pull_request:
push:
branches:
- main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test-windows_rtx.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: RTX - Build and test Windows wheels

on:
pull_request:
#pull_request:
push:
branches:
- main
Expand Down
113 changes: 113 additions & 0 deletions .github/workflows/uv-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: Sync uv.lock

on:
schedule:
# Every Monday at 03:00 UTC; adjust as needed
- cron: "0 3 * * 1"
push:
# to remove: test only
tags: [uv-update-v1]

branches: [main]
paths:
- 'pyproject.toml'
- 'setup.py'
workflow_dispatch:

permissions:
contents: write

jobs:
sync-uv-lock:
runs-on: linux.g5.4xlarge.nvidia.gpu
if: ${{ ! contains(github.actor, 'pytorchbot') }}
# uncomment for run in main branch
#environment: pytorchbot-env
container:
image: pytorch/manylinux2_28-builder:cuda13.0
options: --gpus all
env:
CUDA_VERSION: 13.0
CUDA_HOME: /usr/local/cuda

steps:
- name: Checkout
uses: actions/checkout@v4
with:
# to remove: test only
ref: lluo/add_uv_sync_job
# uncomment for actual run in main branch
#token: ${{ secrets.GH_PYTORCHBOT_TOKEN }}
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "latest"

- name: Install bazel
run: |
set -euo pipefail
set -x
curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.26.0/bazelisk-linux-amd64 \
-o bazelisk-linux-amd64 \
&& mv bazelisk-linux-amd64 /usr/local/bin/bazel \
&& chmod +x /usr/local/bin/bazel
bazel --version

- name: UV lock and check for changes
id: check-changes
working-directory: ${{ github.workspace }}
run: |
set -euo pipefail
set -x
git config --global safe.directory "$GITHUB_WORKSPACE"

if ! uv lock; then
echo "Error: Failed to update uv.lock"
exit 1
fi
echo "successfully ran uv lock"
if git diff --quiet uv.lock; then
echo "No changes to uv.lock"
exit 0
fi
echo "has_changes=true" >> "$GITHUB_OUTPUT"
echo "there is changes to the uv.lock file"
# to remove: test only
git diff uv.lock
cat uv.lock

- name: Validate the changes
id: validate-changes
if: steps.check-changes.outputs.has_changes == 'true'
run: |
set -euo pipefail
set -x
if ! uv sync --frozen; then
echo "Error: Failed to run uv sync --frozen"
exit 1
fi
# if uv run -m pip check; then
# echo "Error: Failed to run uv run -m pip check"
# exit 1
# fi
echo "valid_changes=true" >> "$GITHUB_OUTPUT"
echo "successfully validated the changes to uv.lock"

- name: Auto-commit changes
uses: stefanzweifel/git-auto-commit-action@v7
if: steps.check-changes.outputs.valid_changes == 'true'
with:
commit_message: "chore: update uv.lock"
# to remove: test only
branch: lluo/add_uv_sync_job
commit_options: "--no-verify --signoff"
file_pattern: uv.lock
commit_user_name: Torch-TensorRT Github Bot
commit_user_email: torch-tensorrt.github.bot@nvidia.com
commit_author: Torch-TensorRT Github Bot <torch-tensorrt.github.bot@nvidia.com>

concurrency:
group: ${{ github.workflow }}-uv-update-${{ github.event.pull_request.number || github.ref_name }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ classifiers = [
"Topic :: Software Development :: Libraries",
]
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.10"
requires-python = ">=3.11"
keywords = [
"pytorch",
"torch",
Expand Down
Loading