Skip to content

Adding basic support for GD32F425 #131

Adding basic support for GD32F425

Adding basic support for GD32F425 #131

Workflow file for this run

name: compare mmaps
on:
pull_request_target:
jobs:
compare:
name: Compare mmaps
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
path: main
- name: Checkout pull request
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.number }}/head
path: pr
- name: Checkout mmaps
uses: actions/checkout@v4
with:
repository: gd32-rust/gd32-rs-mmaps
ssh-key: ${{ secrets.MMAPS_KEY }}
path: mmaps
- name: Install Python dependencies
run: |
pip3 install --user setuptools wheel
pip3 install --user svdtools
- name: Put pip binary directory into path
run: echo "~/.local/bin" >> $GITHUB_PATH
- name: Build and publish
run: |
# Grab commit ID from checked out PR
cd pr
COMMIT=$(git rev-parse --short HEAD)
BRANCH=pr-${{ github.event.number }}-$COMMIT
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
# Use the PR's YAML files to rebuild mmaps
cd ../main
rm -rf devices peripherals
mv ../pr/devices ../pr/peripherals .
make -j2 mmaps
# Use the new mmaps to make a commit in the mmaps repo
mv mmaps/* ../mmaps/
cd ../mmaps
git checkout -b $BRANCH
git add .
git config user.name "gd32-rs builder"
git config user.email "[email protected]"
git commit --allow-empty -m "gd32-rs PR #${{ github.event.number }} $COMMIT"
git push origin $BRANCH
- name: Comment
uses: mshick/add-pr-comment@v2
with:
message: |
[Memory map comparison](https://github.com/gd32-rust/gd32-rs-mmaps/compare/${{ env.BRANCH }})
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]'