forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created using spr 1.3.6-beta.1
- Loading branch information
Showing
15 changed files
with
445 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Create PR to update the hooks in .pre-commit-config.yaml | ||
name: Merge xilinx/llvm-project | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# Start 4 am every day | ||
- cron: '0 4 * * *' | ||
|
||
jobs: | ||
auto-update: | ||
permissions: | ||
contents: write # to push a branch | ||
|
||
runs-on: [Ubuntu22.04] | ||
|
||
steps: | ||
# See https://xilinx.slack.com/archives/C03BVM6E423/p1707245513111479 | ||
- name: Clear working directory | ||
run: find . -name . -o -prune -exec rm -rf -- {} + | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
# Fetch all history to be able to check whether we are up-to-date | ||
fetch-depth: 0 | ||
# We only need the git commits, no files in the worktree. | ||
sparse-checkout: README.md | ||
# Use PAT to allow pushing branches even if they affect workflow files | ||
token: ${{ secrets.SVC_ACT_JENKINS_PAT }} | ||
|
||
- name: Is update needed | ||
id: uptodate | ||
run: | | ||
git remote add xilinx https://github.com/Xilinx/llvm-project.git | ||
git fetch xilinx refs/heads/feature/fused-ops | ||
git merge-base --is-ancestor xilinx/feature/fused-ops origin/feature/fused-ops | ||
continue-on-error: true | ||
|
||
- name: Create branch | ||
if: ${{ steps.uptodate.outcome == 'failure' }} | ||
id: create_branch | ||
run: | | ||
BRANCH=merge_feature/fused-ops_$(date +'%Y-%m-%d') | ||
git push origin xilinx/feature/fused-ops:refs/heads/$BRANCH | ||
echo "branch=$BRANCH" >> $GITHUB_OUTPUT | ||
- name: Create Pull Request | ||
if: ${{ steps.uptodate.outcome == 'failure' }} | ||
env: | ||
GH_ENTERPRISE_TOKEN: ${{ secrets.SVC_ACT_JENKINS_PAT }} | ||
GH_HOST: gitenterprise.xilinx.com | ||
run: | | ||
gh pr create \ | ||
--title "Merge xilinx/llvm-project feature/fused-ops" \ | ||
--body "Auto-generated by .github/workflows/merge-upstream.yml" \ | ||
--head "${{steps.create_branch.outputs.branch}}" \ | ||
--base "feature/fused-ops" \ | ||
--reviewer tinamari,mgehre |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.