Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .github/workflows/testing-make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ env:
on:
pull_request:
types: [ opened, synchronize, reopened ]
paths-ignore:
- ".github/**"
- "!.github/workflows/testing-make.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/upgrade-llvm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Upgrade halide-llvm

on:
schedule:
- cron: "0 6 * * *" # Daily at 1am EST / 2am EDT
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
upgrade:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: astral-sh/setup-uv@v5

- name: Upgrade halide-llvm
run: uv lock -P halide-llvm

- name: Check for changes
id: diff
run: |
if git diff --quiet uv.lock; then
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "changed=true" >> "$GITHUB_OUTPUT"

# Extract new resolved versions from the diff
VERSIONS=$(git diff uv.lock \
| grep '^+.*name = "halide-llvm", version' \
| sed 's/.*version = "\([^"]*\)".*/\1/' \
| tr '\n' ',' | sed 's/,/, /g; s/, $//')
echo "versions=$VERSIONS" >> "$GITHUB_OUTPUT"
fi

- name: Create or update PR
if: steps.diff.outputs.changed == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BRANCH="automated/upgrade-halide-llvm"
TITLE="Upgrade halide-llvm to ${{ steps.diff.outputs.versions }}"

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout -B "$BRANCH"
git add uv.lock
git commit -m "$TITLE"

# Update existing PR or create a new one
if gh pr view "$BRANCH" --json state -q .state 2>/dev/null | grep -q OPEN; then
git push -u origin "$BRANCH" --force-with-lease \
&& gh pr edit "$BRANCH" --title "$TITLE"
else
# Delete stale remote branch (e.g. leftover from a merged PR)
git push origin --delete "$BRANCH" 2>/dev/null || true
git push -u origin "$BRANCH"
gh pr create \
--title "$TITLE" \
--body "Automated upgrade via \`uv lock -P halide-llvm\`." \
--head "$BRANCH"
fi
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ ci-base = [
{ include-group = "tools" },
]

ci-llvm-main = [{ include-group = "ci-base" }, "halide-llvm==23.0.0.dev0+g80f627e6"]
ci-llvm-22 = [{ include-group = "ci-base" }, "halide-llvm==22.1.0rc3"]
ci-llvm-21 = [{ include-group = "ci-base" }, "halide-llvm==21.1.8"]
ci-llvm-20 = [{ include-group = "ci-base" }, "halide-llvm==20.1.8"]
ci-llvm-main = [{ include-group = "ci-base" }, "halide-llvm~=23.0.0.dev0"]
ci-llvm-22 = [{ include-group = "ci-base" }, "halide-llvm~=22.1.0rc0"]
ci-llvm-21 = [{ include-group = "ci-base" }, "halide-llvm~=21.1.0"]
ci-llvm-20 = [{ include-group = "ci-base" }, "halide-llvm~=20.1.0"]

[project.urls]
Homepage = "https://halide-lang.org"
Expand Down
8 changes: 4 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading