Rebase and Test ARM32 #52
This file contains hidden or 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
| name: Rebase and Test ARM32 | |
| on: | |
| schedule: | |
| - cron: '0 5 * * *' # Daily at 5am UTC | |
| workflow_dispatch: # Manual trigger | |
| permissions: | |
| contents: write | |
| jobs: | |
| rebase-test: | |
| runs-on: self-hosted | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: arm32-multicore | |
| - name: Configure git | |
| run: | | |
| git config user.name "CI Bot" | |
| git config user.email "ci@example.com" | |
| - name: Fetch upstream trunk | |
| run: | | |
| git remote add upstream https://github.com/ocaml/ocaml.git || true | |
| git fetch upstream trunk | |
| - name: Rebase onto trunk | |
| id: rebase | |
| run: | | |
| if git rebase upstream/trunk; then | |
| echo "rebase_failed=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "rebase_failed=true" >> $GITHUB_OUTPUT | |
| git rebase --abort | |
| fi | |
| - name: Remove upstream workflows | |
| if: steps.rebase.outputs.rebase_failed != 'true' | |
| run: | | |
| find .github/workflows -name '*.yml' ! -name 'rebase-test.yml' -delete | |
| if ! git diff --quiet; then | |
| git add .github/workflows | |
| git commit --amend --no-edit | |
| fi | |
| - name: Build | |
| if: steps.rebase.outputs.rebase_failed != 'true' | |
| run: | | |
| ./configure | |
| make -j4 world.opt | |
| - name: Test | |
| if: steps.rebase.outputs.rebase_failed != 'true' | |
| run: | | |
| TIMEOUT=900 make tests | |
| - name: Push rebased branch | |
| if: steps.rebase.outputs.rebase_failed != 'true' && github.event_name == 'schedule' | |
| run: | | |
| git push --force https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git arm32-multicore | |
| - name: Report rebase failure | |
| if: steps.rebase.outputs.rebase_failed == 'true' | |
| run: | | |
| echo "::error::Rebase failed - manual intervention required" | |
| exit 1 |