Skip to content

Update IREE requirement pins #9

Update IREE requirement pins

Update IREE requirement pins #9

# Copyright 2025 Advanced Micro Devices, Inc.
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
name: Update IREE requirement pins
on:
workflow_dispatch:
inputs:
branch-name:
default: "integrates/iree"
type: string
description: The branch name to put updates on
schedule:
# Weekdays at 11:00 AM UTC = 03:00 AM PST / 04:00 AM PDT
- cron: "0 11 * * 1-5"
permissions:
contents: write
pull-requests: write
env:
GIT_BRANCH_NAME: ${{ inputs.branch-name || 'integrates/iree' }}
jobs:
determine-duty-engineer:
runs-on: ubuntu-24.04
outputs:
duty-engineer: ${{ steps.set-duty.outputs.engineer }}
steps:
- name: Determine IREE bump duty engineer
id: set-duty
run: |
# rotation schedule (GitHub usernames); add yourself into this schedule to get notified when it's your turn.
ENGINEERS=('renxida')
# current week number (1-53)
WEEK=$(date +%V)
INDEX=$(( WEEK % ${#ENGINEERS[@]} ))
DUTY_ENGINEER=${ENGINEERS[$INDEX]}
echo "engineer=$DUTY_ENGINEER" >> $GITHUB_OUTPUT
echo "This week's IREE bump duty engineer: $DUTY_ENGINEER"
check-for-existing-branch:
if: ${{ github.repository_owner == 'nod-ai' || github.event_name != 'schedule' }}
runs-on: ubuntu-24.04
outputs:
branch-exists: ${{ steps.check-exists.outputs.branch-exists }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Check for existing integrate branch
id: check-exists
run: |
BRANCH_EXISTS=$(git ls-remote --exit-code --heads origin ${{ env.GIT_BRANCH_NAME }} | wc -l)
echo branch-exists=${BRANCH_EXISTS} >> "${GITHUB_OUTPUT}"
if [[ ${BRANCH_EXISTS} == 1 ]]; then
echo "Skipping update PR creation since the `${{ env.GIT_BRANCH_NAME }}` branch already exists." >> ${GITHUB_STEP_SUMMARY}
fi
update-iree:
needs: [check-for-existing-branch, determine-duty-engineer]
runs-on: ubuntu-24.04
if: ${{ needs.check-for-existing-branch.outputs.branch-exists == 0 }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: "Setting up Python"
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: 3.11
# This sets a few environment variables via GITHUB_ENV.
- name: Update IREE requirement pins
run: build_tools/update_iree_requirement_pins.py
- uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
if: ${{ env.CREATE_PULL_REQUEST_TOKEN_APP_ID != '' && env.CREATE_PULL_REQUEST_TOKEN_APP_PRIVATE_KEY != '' }}
id: generate-token
with:
app-id: ${{ secrets.CREATE_PULL_REQUEST_TOKEN_APP_ID }}
private-key: ${{ secrets.CREATE_PULL_REQUEST_TOKEN_APP_PRIVATE_KEY }}
env:
CREATE_PULL_REQUEST_TOKEN_APP_ID: ${{ secrets.CREATE_PULL_REQUEST_TOKEN_APP_ID }}
CREATE_PULL_REQUEST_TOKEN_APP_PRIVATE_KEY: ${{ secrets.CREATE_PULL_REQUEST_TOKEN_APP_PRIVATE_KEY }}
- name: Create or update pull request
if: |
${{ env.CURRENT_IREE_BASE_COMPILER_VERSION }} != ${{ env.LATEST_IREE_BASE_COMPILER_VERSION }} || \
${{ env.CURRENT_IREE_BASE_RUNTIME_VERSION }} != ${{ env.LATEST_IREE_BASE_RUNTIME_VERSION }} || \
${{ env.CURRENT_IREE_TURBINE_VERSION }} != ${{ env.LATEST_IREE_TURBINE_VERSION }}
${{ env.CURRENT_SHORTFIN_IREE_GIT_TAG }} != ${{ env.LATEST_SHORTFIN_IREE_GIT_TAG }}
id: cpr
uses: peter-evans/create-pull-request@dd2324fc52d5d43c699a5636bcf19fceaa70c284 # v7.0.7
with:
token: ${{ steps.generate-token.outputs.token || secrets.GITHUB_TOKEN }}
base: main
branch: ${{ env.GIT_BRANCH_NAME }}
author: shark-pr-automator[bot] <41898282+github-actions[bot]@users.noreply.github.com>
signoff: true
title: "Bump IREE requirement pins to ${{ env.LATEST_IREE_BASE_COMPILER_VERSION }}"
body: |
Diff: https://github.com/iree-org/iree/compare/iree-${{ env.CURRENT_IREE_BASE_COMPILER_VERSION }}...iree-${{ env.LATEST_IREE_BASE_COMPILER_VERSION }}
IREE bump duty engineer this week: @${{ needs.determine-duty-engineer.outputs.duty-engineer }}
Auto-generated by GitHub Actions using [`.github/workflows/update_iree_requirement_pins.yml`](https://github.com/${{ github.repository }}/blob/main/.github/workflows/update_iree_requirement_pins.yml).
commit-message: "Bump IREE to ${{ env.LATEST_IREE_BASE_COMPILER_VERSION }}."
assignees: ${{ needs.determine-duty-engineer.outputs.duty-engineer }}
- name: Write summary
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request URL: ${{ steps.cpr.outputs.pull-request-url }}" >> ${GITHUB_STEP_SUMMARY}
echo "IREE bump duty engineer: @${{ needs.determine-duty-engineer.outputs.duty-engineer }}" >> ${GITHUB_STEP_SUMMARY}