Skip to content

Daily rebase

Daily rebase #805

Workflow file for this run

name: Daily rebase
on:
schedule:
- cron: "0 5 * * *"
workflow_dispatch:
inputs:
origin_branch:
description: 'Name of origin branch that should be rebased onto upstream branch'
required: true
default: 'woarm64'
upstream_branch:
description: 'Name of upstream branch the origin branch should be rebased onto'
required: true
default: 'master'
rebase_branch:
description: 'Name of temporary branch used to verify the rebase'
required: true
default: 'rebase-upstream'
backup_branch:
description: 'Name for backup of origin branch from time when the rebase started'
required: true
default: 'rebase-upstream-backup'
permissions:
repository-projects: write
env:
BINUTILS_REPO: Windows-on-ARM-Experiments/binutils-woarm64
BINUTILS_UPSTREAM_URL: git://sourceware.org/git/binutils-gdb.git
GCC_REPO: Windows-on-ARM-Experiments/gcc-woarm64
GCC_UPSTREAM_URL: git://gcc.gnu.org/git/gcc.git
MINGW_REPO: Windows-on-ARM-Experiments/mingw-woarm64
MINGW_UPSTREAM_URL: https://git.code.sf.net/p/mingw-w64/mingw-w64
CYGWIN_REPO: Windows-on-ARM-Experiments/newlib-cygwin
CYGWIN_UPSTREAM_URL: git://sourceware.org/git/newlib-cygwin.git
SOURCE_PATH: ${{ github.workspace }}/code
ORIGIN_BRANCH: ${{ inputs.origin_branch || 'woarm64' }}
UPSTREAM_BRANCH: ${{ inputs.upstream_branch || 'master' }}
REBASE_BRANCH: ${{ inputs.rebase_branch || 'rebase-upstream' }}
BACKUP_BRANCH: ${{ inputs.backup_branch || 'rebase-upstream-backup' }}
jobs:
start-binutils-rebase:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
- name: Checkout binutils
uses: actions/checkout@v4
with:
token: ${{ secrets.GNU_PUSH_PAT }}
repository: ${{ env.BINUTILS_REPO }}
ref: ${{ env.ORIGIN_BRANCH }}
fetch-depth: 0
path: ${{ env.SOURCE_PATH }}/binutils
- name: Start binutils rebase
working-directory: ${{ env.SOURCE_PATH }}/binutils
run: |
${{ github.workspace }}/.github/scripts/rebase-start.sh \
${{ env.BINUTILS_UPSTREAM_URL }} \
${{ env.UPSTREAM_BRANCH }} \
${{ env.REBASE_BRANCH }} \
${{ env.BACKUP_BRANCH }}
start-gcc-rebase:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
- name: Checkout GCC
uses: actions/checkout@v4
with:
token: ${{ secrets.GNU_PUSH_PAT }}
repository: ${{ env.GCC_REPO }}
ref: ${{ env.ORIGIN_BRANCH }}
fetch-depth: 0
path: ${{ env.SOURCE_PATH }}/gcc
- name: Start GCC rebase
working-directory: ${{ env.SOURCE_PATH }}/gcc
run: |
${{ github.workspace }}/.github/scripts/rebase-start.sh \
${{ env.GCC_UPSTREAM_URL }} \
${{ env.UPSTREAM_BRANCH }} \
${{ env.REBASE_BRANCH }} \
${{ env.BACKUP_BRANCH }}
start-mingw-rebase:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
- name: Checkout MinGW
uses: actions/checkout@v4
with:
token: ${{ secrets.GNU_PUSH_PAT }}
repository: ${{ env.MINGW_REPO }}
ref: ${{ env.ORIGIN_BRANCH }}
fetch-depth: 0
path: ${{ env.SOURCE_PATH }}/mingw
- name: Start MinGW rebase
working-directory: ${{ env.SOURCE_PATH }}/mingw
run: |
${{ github.workspace }}/.github/scripts/rebase-start.sh \
${{ env.MINGW_UPSTREAM_URL }} \
${{ env.UPSTREAM_BRANCH }} \
${{ env.REBASE_BRANCH }} \
${{ env.BACKUP_BRANCH }}
start-cygwin-rebase:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
- name: Checkout Cygwin
uses: actions/checkout@v4
with:
token: ${{ secrets.GNU_PUSH_PAT }}
repository: ${{ env.CYGWIN_REPO }}
ref: ${{ env.ORIGIN_BRANCH }}
fetch-depth: 0
path: ${{ env.SOURCE_PATH }}/cygwin
- name: Start Cygwin rebase
working-directory: ${{ env.SOURCE_PATH }}/cygwin
run: |
${{ github.workspace }}/.github/scripts/rebase-start.sh \
${{ env.CYGWIN_UPSTREAM_URL }} \
${{ env.UPSTREAM_BRANCH }} \
${{ env.REBASE_BRANCH }} \
${{ env.BACKUP_BRANCH }}
build:
needs: [
start-binutils-rebase,
start-gcc-rebase,
start-mingw-rebase,
start-cygwin-rebase
]
uses: ./.github/workflows/advanced.yml
with:
binutils_branch: ${{ inputs.rebase_branch || 'rebase-upstream' }}
gcc_branch: ${{ inputs.rebase_branch || 'rebase-upstream' }}
mingw_branch: ${{ inputs.rebase_branch || 'rebase-upstream' }}
cygwin_branch: ${{ inputs.rebase_branch || 'rebase-upstream' }}
finish-binutils-rebase:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
- name: Checkout binutils
uses: actions/checkout@v4
with:
token: ${{ secrets.GNU_PUSH_PAT }}
repository: ${{ env.BINUTILS_REPO }}
ref: ${{ env.ORIGIN_BRANCH }}
path: ${{ env.SOURCE_PATH }}/binutils
- name: Finish binutils rebase
working-directory: ${{ env.SOURCE_PATH }}/binutils
run: |
${{ github.workspace }}/.github/scripts/rebase-finish.sh \
${{ env.REBASE_BRANCH }} \
${{ env.ORIGIN_BRANCH }} \
${{ env.BACKUP_BRANCH }}
finish-gcc-rebase:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
- name: Checkout GCC
uses: actions/checkout@v4
with:
token: ${{ secrets.GNU_PUSH_PAT }}
repository: ${{ env.GCC_REPO }}
ref: ${{ env.ORIGIN_BRANCH }}
path: ${{ env.SOURCE_PATH }}/gcc
- name: Finish GCC rebase
working-directory: ${{ env.SOURCE_PATH }}/gcc
run: |
${{ github.workspace }}/.github/scripts/rebase-finish.sh \
${{ env.REBASE_BRANCH }} \
${{ env.ORIGIN_BRANCH }} \
${{ env.BACKUP_BRANCH }}
finish-mingw-rebase:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
- name: Checkout MinGW
uses: actions/checkout@v4
with:
token: ${{ secrets.GNU_PUSH_PAT }}
repository: ${{ env.MINGW_REPO }}
ref: ${{ env.ORIGIN_BRANCH }}
path: ${{ env.SOURCE_PATH }}/mingw
- name: Finish MinGW rebase
working-directory: ${{ env.SOURCE_PATH }}/mingw
run: |
${{ github.workspace }}/.github/scripts/rebase-finish.sh \
${{ env.REBASE_BRANCH }} \
${{ env.ORIGIN_BRANCH }} \
${{ env.BACKUP_BRANCH }}
finish-cygwin-rebase:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
- name: Checkout Cygwin
uses: actions/checkout@v4
with:
token: ${{ secrets.GNU_PUSH_PAT }}
repository: ${{ env.CYGWIN_REPO }}
ref: ${{ env.ORIGIN_BRANCH }}
path: ${{ env.SOURCE_PATH }}/cygwin
- name: Finish Cygwin rebase
working-directory: ${{ env.SOURCE_PATH }}/cygwin
run: |
${{ github.workspace }}/.github/scripts/rebase-finish.sh \
${{ env.REBASE_BRANCH }} \
${{ env.ORIGIN_BRANCH }} \
${{ env.BACKUP_BRANCH }}
clean-binutils-rebase:
if: always()
needs: [finish-binutils-rebase]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
- name: Checkout binutils
uses: actions/checkout@v4
with:
token: ${{ secrets.GNU_PUSH_PAT }}
repository: ${{ env.BINUTILS_REPO }}
ref: ${{ env.ORIGIN_BRANCH }}
fetch-depth: 0
path: ${{ env.SOURCE_PATH }}/binutils
- name: Clean binutils rebase
working-directory: ${{ env.SOURCE_PATH }}/binutils
run: |
${{ github.workspace }}/.github/scripts/rebase-clean.sh \
${{ env.REBASE_BRANCH }} \
${{ env.BACKUP_BRANCH }}
clean-gcc-rebase:
if: always()
needs: [finish-gcc-rebase]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
- name: Checkout GCC
uses: actions/checkout@v4
with:
token: ${{ secrets.GNU_PUSH_PAT }}
repository: ${{ env.GCC_REPO }}
ref: ${{ env.ORIGIN_BRANCH }}
fetch-depth: 0
path: ${{ env.SOURCE_PATH }}/gcc
- name: Clean GCC rebase
working-directory: ${{ env.SOURCE_PATH }}/gcc
run: |
${{ github.workspace }}/.github/scripts/rebase-clean.sh \
${{ env.REBASE_BRANCH }} \
${{ env.BACKUP_BRANCH }}
clean-mingw-rebase:
if: always()
needs: [finish-mingw-rebase]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
- name: Checkout MinGW
uses: actions/checkout@v4
with:
token: ${{ secrets.GNU_PUSH_PAT }}
repository: ${{ env.MINGW_REPO }}
ref: ${{ env.ORIGIN_BRANCH }}
fetch-depth: 0
path: ${{ env.SOURCE_PATH }}/mingw
- name: Clean MinGW rebase
working-directory: ${{ env.SOURCE_PATH }}/mingw
run: |
${{ github.workspace }}/.github/scripts/rebase-clean.sh \
${{ env.REBASE_BRANCH }} \
${{ env.BACKUP_BRANCH }}
clean-cygwin-rebase:
if: always()
needs: [finish-cygwin-rebase]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
- name: Checkout Cygwin
uses: actions/checkout@v4
with:
token: ${{ secrets.GNU_PUSH_PAT }}
repository: ${{ env.CYGWIN_REPO }}
ref: ${{ env.ORIGIN_BRANCH }}
path: ${{ env.SOURCE_PATH }}/cygwin
- name: Clean Cygwin rebase
working-directory: ${{ env.SOURCE_PATH }}/cygwin
run: |
${{ github.workspace }}/.github/scripts/rebase-clean.sh \
${{ env.REBASE_BRANCH }} \
${{ env.BACKUP_BRANCH }}
deploy:
if: github.ref == 'refs/heads/woarm64'
needs: [build]
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
environment:
name: release
url: ${{steps.create-release.outputs.url }}
steps:
- name: Download toolchain artifact
uses: actions/download-artifact@v4
with:
name: ${{ needs.build.outputs.toolchain-artifact-name }}
- name: Download runtime artifact
uses: actions/download-artifact@v4
with:
name: ${{ needs.build.outputs.runtime-artifact-name }}
- name: Create tag
run: |
echo "TAG=$(date --rfc-3339=date)" >> ${GITHUB_ENV}
- name: Create release
id: create-release
uses: softprops/action-gh-release@v2
with:
files: |
${{ needs.build.outputs.toolchain-package-name }}
${{ needs.build.outputs.runtime-package-name }}
tag_name: ${{ env.TAG }}