Skip to content

Commit

Permalink
[CI] create llvm auto-bump workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental committed Nov 16, 2024
1 parent 40b284c commit 295118e
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build_eudsl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,18 @@ on:
required: false
default: false
pull_request:
paths:
- ".github/workflows/build_eudsl.yml"
- "projects/eudsl"
- "third_party/llvm-project"
merge_group:
push:
branches:
- main
paths:
- ".github/workflows/build_eudsl.yml"
- "projects/eudsl"
- "third_party/llvm-project"

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/bump_llvm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Auto bump LLVM
on:
pull_request:
paths:
- ".github/workflows/bump_llvm.yml"
schedule:
# At minute 0 past hour 1. (see https://crontab.guru)
- cron: '00 01 * * *'
jobs:
update-dep:

name: "Bump LLVM and send PR"

runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write

steps:
- name: "Check out repository"
uses: actions/[email protected]
with:
submodules: true

- name: "Sync third-party/llvm-project"
id: sync-llvm-project
run: |
pushd third_party/llvm-project
git checkout main && git pull
echo "LLVM_SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
popd
- uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.BUMP_LLVM_CREATE_PR_APP_ID }}
private-key: ${{ secrets.BUMP_LLVM_CREATE_PR_APP_PRIVATE_KEY }}

- name: "Create Pull Request"
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.generate-token.outputs.token }}
commit-message: [LLVM] Bump to ${{ steps.sync-llvm-project.outputs.LLVM_SHA_SHORT }}
title: [LLVM] Bump to ${{ steps.sync-llvm-project.outputs.LLVM_SHA_SHORT }}
body: "Bump LLVM to https://github.com/llvm/llvm-project/commit/${{ steps.sync-llvm-project.outputs.LLVM_SHA_SHORT }}"
base: main
branch: update-llvm
delete-branch: true
assignees: makslevental
reviewers: makslevental

0 comments on commit 295118e

Please sign in to comment.