Skip to content

Daily rebase

Daily rebase #440

Workflow file for this run

name: Daily rebase
on:
schedule:
- cron: "0 5 * * *"
workflow_dispatch:
inputs:
origin_branch:
description: 'Origin branch'
required: true
default: 'woarm64'
upstream_branch:
description: 'Upstream branch'
required: true
default: 'master'
rebase_branch:
description: 'Rebase branch'
required: true
default: 'rebase-upstream'
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' }}
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 }}
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 }}
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 }}
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 }}
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' }}
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 }}
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 }}
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 }}
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 }}
deploy:
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 }}