forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add nightly rebase of branches with upstream julia
- Loading branch information
Showing
1 changed file
with
70 additions
and
0 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,70 @@ | ||
# Every night, rebase the Julia branches on top of raicode `master`. | ||
name: NightlyRebaseUpstream | ||
on: | ||
schedule: | ||
# every night at 11 PM, raicode nightly rebase runs at midnight | ||
- cron: 0 23 * * * | ||
workflow_dispatch: | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
jobs: | ||
NightlyRebaseUpstream: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false # run all jobs in the matrix even if one fails | ||
matrix: | ||
julia_branch: | ||
- { name: "backports-release-1.9+RAI", upstream: "backports-release-1.9"} | ||
- { name: "backports-release-1.10+RAI", upstream: "backports-release-1.10"} | ||
- { name: "master+RAI", upstream: "master"} | ||
steps: | ||
- name: Checkout the repo and our branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ matrix.julia_branch.name }} | ||
# Needed to make rebasing work (https://github.com/actions/checkout/issues/372) | ||
fetch-depth: 0 | ||
- name: Attempt the rebase | ||
id: attempt_the_rebase | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "RAI CI (GitHub Action Automation)" | ||
git remote add upstream https://github.com/JuliaLang/julia | ||
git fetch --quiet upstream ${{ matrix.julia_branch.upstream }}} | ||
git rebase upstream/${{ matrix.julia_branch.upstream }} | ||
continue-on-error: true | ||
- name: On rebase success, push | ||
if: steps.attempt_the_rebase.outcome == 'success' | ||
run: | | ||
git push --force origin ${{ matrix.julia_branch.name }} # force-push, because of the rebase. | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# --- Install Julia: Copied from CompatHelper ------------------------ | ||
- name: On rebase failure, install Julia nightly | ||
if: steps.attempt_the_rebase.outcome != 'success' | ||
uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: 'nightly' # use the nightly build to do the Pkg.update() | ||
arch: ${{ runner.arch }} | ||
# -------------------------------------------------------------------- | ||
- name: On rebase failure, checkout jira-incident action | ||
if: steps.attempt_the_rebase.outcome != 'success' && steps.attempt_resolve_manifest.outcome != 'success' | ||
id: checkout-jira-indicent-action | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: RelationalAI/raicloud-deployment | ||
ssh-key: ${{ secrets.DELVECI_SSH }} | ||
path: deployment-repo | ||
- name: On rebase failure, create Jira incident | ||
if: steps.attempt_the_rebase.outcome != 'success' && steps.attempt_resolve_manifest.outcome != 'success' | ||
id: create-jira-indicent | ||
uses: ./deployment-repo/.github/actions/create-jira-incident | ||
with: | ||
affected_service: Engineering - Julia Upgrades - Medium Priority Only | ||
summary: "Nightly rebase failed for RelationalAI/julia branch `${{ matrix.julia_branch.name }}`" | ||
description: "Failed to rebase RelationalAI/julia branch `${{ matrix.julia_branch.name }}` branch on top of `${{ matrix.julia_branch.upstream}}`.\nPlease manually rebase ${{ matrix.julia_branch.name }}\n" | ||
user_email: ${{ secrets.JIRA_API_USER_EMAIL }} | ||
jira_api_token: ${{ secrets.JIRA_API_TOKEN }} | ||
priority: "Medium" |