Skip to content
Merged
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
32 changes: 32 additions & 0 deletions .github/workflows/nightly-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,40 @@ concurrency:
cancel-in-progress: true

jobs:
check-changes:
name: Check for new commits
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
outputs:
has_new_commits: ${{ steps.check.outputs.has_new_commits }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check for commits in last 24 hours
id: check
run: |
# Check if there are any commits in the last 25 hours
# (25h instead of 24h to add a buffer for cron scheduling jitter)
RECENT_COMMITS=$(git log --oneline --since="25 hours ago" HEAD)
if [ -z "$RECENT_COMMITS" ]; then
echo "No new commits in the last 25 hours. Skipping wheel build."
echo "has_new_commits=false" >> $GITHUB_OUTPUT
else
echo "New commits found:"
echo "$RECENT_COMMITS"
echo "has_new_commits=true" >> $GITHUB_OUTPUT
fi

build-wheels:
name: Build triton wheel (Python ${{ matrix.python_version }})
needs: [check-changes]
if: >-
always() &&
(needs.check-changes.result == 'skipped' ||
needs.check-changes.outputs.has_new_commits == 'true')

runs-on: ubuntu-latest

Expand Down
Loading