Skip to content

Update IREE requirement pins #364

Update IREE requirement pins

Update IREE requirement pins #364

# 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=('')
# 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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- 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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: "Setting up Python"
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.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@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
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: |

Check warning on line 92 in .github/workflows/update_iree_requirement_pins.yml

View workflow run for this annotation

GitHub Actions / Update IREE requirement pins

Workflow syntax warning

.github/workflows/update_iree_requirement_pins.yml (Line: 92, Col: 13): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?
${{ 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@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
with:
token: ${{ steps.generate-token.outputs.token || secrets.GITHUB_TOKEN }}
base: main
branch: ${{ env.GIT_BRANCH_NAME }}
author: amdshark-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}