Skip to content

Update IREE requirement pins #113

Update IREE requirement pins

Update IREE requirement pins #113

# Copyright 2025 The IREE Authors
#
# 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:
check-for-existing-branch:
if: ${{ github.repository_owner == 'iree-org' || github.event_name != 'schedule' }}
runs-on: ubuntu-22.04
outputs:
branch-exists: ${{ steps.check-exists.outputs.branch-exists }}
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- 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
runs-on: ubuntu-22.04
if: ${{ needs.check-for-existing-branch.outputs.branch-exists == 0 }}
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: "Setting up Python"
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: 3.13
# 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@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2.2.0
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 72 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: 72, 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 }}
id: cpr
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9
with:
token: ${{ steps.generate-token.outputs.token || secrets.GITHUB_TOKEN }}
base: main
branch: ${{ env.GIT_BRANCH_NAME }}
author: iree-pr-automator[bot] <iree-github-actions-bot@google.com>
signoff: true
title: "Bump IREE requirement pins to their latest versions."
body: |
Diff: https://github.com/iree-org/iree/compare/iree-${{ env.CURRENT_IREE_BASE_COMPILER_VERSION }}...iree-${{ env.LATEST_IREE_BASE_COMPILER_VERSION }}
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 }}."
- name: Write summary
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request URL: ${{ steps.cpr.outputs.pull-request-url }}" >> ${GITHUB_STEP_SUMMARY}