Skip to content
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

Add script+workflow to update IREE requirement pins. #388

Merged
merged 4 commits into from
Jan 15, 2025

Conversation

ScottTodd
Copy link
Member

@ScottTodd ScottTodd commented Jan 14, 2025

This is a redo of #376.

This adds a new workflow that runs once a day to update all pinned IREE versions. I also looked into using Dependabot but found that it struggles with --find-links, --index-url, and with there being multiple requirements.txt files in a repository. While I would love to not need to reinvent this wheel, I do like keeping full control over the process.

This PR includes:

  • A new build_tools/update_iree_requirement_pins.py script handles updating the pins in requirements-iree-pinned.txt and setting some variables in GITHUB_ENV
  • A new .github/workflows/update_iree_requirement_pins.yml workflow runs that script then calls https://github.com/peter-evans/create-pull-request to create or update a pull request if there are local changes after running that script. The commit message and pull request body are constructed using the variables set by the script.

We can adapt this approach to other update actions in other repositories like https://github.com/nod-ai/shark-ai by teaching the script(s) to update more version pins and write more output variables, then changing the pull request text to fit the new content.

Test action run: https://github.com/ScottTodd/iree-turbine/actions/runs/12776912409
Test pull request: ScottTodd#10

@ScottTodd ScottTodd requested a review from marbre January 14, 2025 21:49
Copy link

@renxida renxida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

Copy link
Member

@marbre marbre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Just a minor NIT.

.github/workflows/update_iree_requirement_pins.yml Outdated Show resolved Hide resolved
@ScottTodd ScottTodd enabled auto-merge (squash) January 15, 2025 21:12
@ScottTodd ScottTodd merged commit 7f22dc8 into iree-org:main Jan 15, 2025
9 of 10 checks passed
@ScottTodd
Copy link
Member Author

Triggered a run manually for testing after merge: https://github.com/iree-org/iree-turbine/actions/runs/12797520389 . That worked as expected: #389. Future runs should be automatic on a nightly schedule.

ScottTodd added a commit to nod-ai/shark-ai that referenced this pull request Jan 16, 2025
Progress on #760, built off of
the work in iree-org/iree-turbine#388.

This adds a new workflow that runs once a day to update all pinned IREE
versions. I also looked into using Dependabot but found that it
struggles with `--find-links`, `--index-url`, and with there being
multiple `requirements.txt` files in a repository. While I would love to
not need to reinvent this wheel, I do like keeping full control over the
process.

This PR includes:

* A new `build_tools/update_iree_requirement_pins.py` script handles
updating the pins in `requirements-iree-pinned.txt` and
`shortfin/CMakeLists.txt`. The script also sets some variables in
`GITHUB_ENV`.
* A new `.github/workflows/update_iree_requirement_pins.yml` workflow
runs that script then calls
https://github.com/peter-evans/create-pull-request to create or update a
pull request if there are local changes after running that script. The
commit message and pull request body are constructed using the variables
set by the script.

Test action run:
https://github.com/ScottTodd/shark-ai/actions/runs/12777789320
Test pull request: ScottTodd#1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants