diff --git a/.github/workflows/build-test-linux-aarch64-jetpack.yml b/.github/workflows/build-test-linux-aarch64-jetpack.yml index 744a802bfa..ad35bd6da5 100644 --- a/.github/workflows/build-test-linux-aarch64-jetpack.yml +++ b/.github/workflows/build-test-linux-aarch64-jetpack.yml @@ -1,7 +1,7 @@ name: Build and test Linux aarch64 wheels for Jetpack on: - pull_request: + #pull_request: push: branches: - main diff --git a/.github/workflows/build-test-linux-aarch64.yml b/.github/workflows/build-test-linux-aarch64.yml index 1f2c98da56..fb1ed0af0a 100644 --- a/.github/workflows/build-test-linux-aarch64.yml +++ b/.github/workflows/build-test-linux-aarch64.yml @@ -1,7 +1,7 @@ name: Build and test Linux aarch64 wheels on: - pull_request: + #pull_request: push: branches: - main diff --git a/.github/workflows/build-test-linux-x86_64.yml b/.github/workflows/build-test-linux-x86_64.yml index 51f3730d02..fbd8aa0d7e 100644 --- a/.github/workflows/build-test-linux-x86_64.yml +++ b/.github/workflows/build-test-linux-x86_64.yml @@ -1,7 +1,7 @@ name: Build and test Linux x86_64 wheels on: - pull_request: + #pull_request: push: branches: - main diff --git a/.github/workflows/build-test-windows.yml b/.github/workflows/build-test-windows.yml index 40171540fc..f731b344e4 100644 --- a/.github/workflows/build-test-windows.yml +++ b/.github/workflows/build-test-windows.yml @@ -1,7 +1,7 @@ name: Build and test Windows wheels on: - pull_request: + #pull_request: push: branches: - main diff --git a/.github/workflows/weeklies.yml b/.github/workflows/weeklies.yml new file mode 100644 index 0000000000..c9c85ab69b --- /dev/null +++ b/.github/workflows/weeklies.yml @@ -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 \ No newline at end of file