Skip to content

add weekly cron job to upgrade uv lock #3616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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-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
79 changes: 79 additions & 0 deletions .github/workflows/weeklies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Routine WeeklyCron Job

on:
pull_request:
schedule:
- cron: '0 0 * * 1' # Runs at 00:00 UTC every Monday (minute hour day-of-month month-of-year day-of-week)

workflow_dispatch:

jobs:
upgrade_uv_lock:
runs-on: linux.g5.4xlarge.nvidia.gpu
environment: pytorchbot-env
container:
image: docker.io/pytorch/manylinux2_28-builder:cuda12.8
options: --gpus all
env:
CUDA_HOME: /usr/local/cuda-12.8
VERSION_SUFFIX: cu128
CU_VERSION: cu128
timeout-minutes: 120
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
repository: pytorch/tensorrt
ref: main
token: ${{ secrets.GH_PYTORCHBOT_TOKEN }}
- name: Install uv and upgrade lock file
run: |
set -euo pipefail
set -x
python -m pip install uv
echo "github.ref_name: ${{ github.ref_name }}"
echo "github.head_ref: ${{ github.head_ref }}"
pwd
ls -lart
git config --global --add safe.directory /__w/TensorRT/TensorRT
uv sync --upgrade
- name: Create Branch and Commit changes
id: commit
shell: bash
run: |
set -euo pipefail
set -x
git config --global user.email "pytorchbot@pytorch.com"
git config --global user.name "pytorchbot"
# Check for changes only in uv.lock
if git diff --quiet uv.lock; then
echo "changes=false" >> $GITHUB_OUTPUT
echo "No dependency updates found for uv.lock file"
else
echo "changes=true" >> $GITHUB_OUTPUT
echo "uv.lock file changed"
timestamp=$(date +%s)
branch_name="deps/uv-upgrade-$timestamp"
echo "branch=$branch_name" >> $GITHUB_OUTPUT
git checkout -b $branch_name
git add uv.lock
git commit -m "chore(deps): weekly automated upgrade via uv"
git push -u origin $branch_name
fi
- name: Create Pull Request
if: steps.commit.outputs.changes == 'true'
uses: peter-evans/create-pull-request@v6
with:
title: "chore(deps): weekly automated upgrade via uv"
body: "This PR is automatically created by the weekly routine job"
base: main
branch: ${{ steps.commit.outputs.branch }}
labels: "dependencies,automated"
assignees: "lanl@nvidia.com" # Add your team's GitHub usernames
reviewers: "lanl@nvidia.com" # Add reviewers if desired
commit-message: "chore(deps): weekly automated upgrade via uv" # Keep the commit we already made
delete-branch: true # Auto-delete branch after merge

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
Loading