| # Copyright 2020 Google LLC |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # https://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| # Creates a PR to update the TF submodule to HEAD & copy the latest |
| # version of the LLVM Bazel BUILD files from TF. |
| |
| name: Update TensorFlow |
| |
| on: |
| schedule: |
| # Every 6 hours at 0, 6, 12, 18 UTC (4, 10, 16, 22 PST) |
| - cron: '0 */6 * * *' |
| |
| jobs: |
| update_tf: |
| # 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 "::set-env name=TF_SHA::$(git submodule status third_party/tensorflow | awk '{print $1}' | cut -c -12)" |
| echo "::set-env name=LLVM_SHA::$(git submodule status third_party/llvm-project | awk '{print $1}' | cut -c -12)" |
| - name: Creating Pull Request |
| uses: peter-evans/create-pull-request@v2 |
| with: |
| # Personal token is required to trigger additional automation (e.g. presubmits). |
| token: ${{ secrets.GITHUB_WRITE_ACCESS_TOKEN }} |
| commit-message: "Integrate TF at tensorflow/tensorflow@${{ env.TF_SHA }}" |
| title: "Integrate TF at tensorflow/tensorflow@${{ env.TF_SHA }}" |
| body: | |
| Updates TF to |
| [${{ env.TF_SHA }}](https://github.com/tensorflow/tensorflow/commit/${{ env.TF_SHA }}) |
| matching |
| [${{ env.LLVM_SHA }}](https://github.com/llvm/llvm-project/commit/${{ env.LLVM_SHA }}) |
| and copies over the LLVM BUILD files. |
| |
| `./scripts/git/update_to_llvm_syncpoint.py` |
| |
| Automated submodule bump from .github/workflows/update_tf.yml |
| committer: "Submodule Update Action <iree-github-actions-bot@google.com>" |
| branch: "auto_submodule_update" |