| # Copyright 2020 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 |
| |
| # Creates a PR to update all LLVM-dependent submodules to the current LLVM |
| # commit in the repo. |
| |
| name: Synchronize LLVM Dependents |
| |
| on: |
| workflow_dispatch: |
| schedule: |
| # Every 6 hours at 0, 6, 12, 18 UTC (4, 10, 16, 22 PST) |
| - cron: "0 */6 * * *" |
| |
| jobs: |
| update_llvm_dependents: |
| # Don't run this in everyone's forks. |
| if: github.repository == 'google/iree' |
| runs-on: ubuntu-18.04 |
| steps: |
| - name: Checking out repository |
| uses: actions/checkout@v2 |
| with: |
| ref: "google" |
| - name: Initializing submodules |
| run: ./scripts/git/submodule_versions.py init |
| - name: Updating submodules |
| run: ./scripts/git/update_to_llvm_syncpoint.py |
| - name: Calculating SHAs |
| run: | |
| echo "LLVM_SHA=$(git submodule status third_party/llvm-project | awk '{print $1}' | cut -c -12)" >> $GITHUB_ENV |
| echo "TF_SHA=$(git submodule status third_party/tensorflow | awk '{print $1}' | cut -c -12)" >> $GITHUB_ENV |
| echo "MLIR_HLO_SHA=$(git submodule status third_party/mlir-hlo | awk '{print $1}' | cut -c -12)" >> $GITHUB_ENV |
| - name: Creating Pull Request |
| uses: peter-evans/create-pull-request@v3 |
| with: |
| # Personal token is required to trigger additional automation (e.g. presubmits). |
| token: ${{ secrets.WRITE_ACCESS_TOKEN }} |
| commit-message: "Synchronize submodules with LLVM at llvm/llvm-project@${{ env.LLVM_SHA }}" |
| title: "Synchronize submodules with LLVM at llvm/llvm-project@${{ env.LLVM_SHA }}" |
| body: | |
| Updates LLVM dependencies to match |
| [${{ env.LLVM_SHA }}](https://github.com/llvm/llvm-project/commit/${{ env.LLVM_SHA }}). |
| - TensorFlow to |
| [${{ env.TF_SHA }}](https://github.com/tensorflow/tensorflow/commit/${{ env.TF_SHA }}) |
| - MLIR-HLO to |
| [${{ env.MLIR_HLO_SHA }}](https://github.com/tensorflow/mlir-hlo/commit/${MLIR_HLO_SHA?}) |
| |
| `./scripts/git/update_to_llvm_syncpoint.py` |
| |
| Automated submodule bump from .github/workflows/update_llvm_dependent_submodules.yml |
| author: "Submodule Update Action <iree-github-actions-bot@google.com>" |
| committer: "Submodule Update Action <iree-github-actions-bot@google.com>" |
| branch: "auto_submodule_update" |