fix: add Cortex-R5 support to eos_hal_set_msp() #9
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| - "v*.*.*-*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| validate: | |
| name: Validate Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build + Test | |
| run: | | |
| cmake -B build -DEBLDR_BUILD_TESTS=ON | |
| cmake --build build | |
| ctest --test-dir build --output-on-failure | |
| cross-compile: | |
| name: Cross-Compile (${{ matrix.arch }}) | |
| runs-on: ubuntu-latest | |
| needs: validate | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: arm-cortex-m | |
| toolchain: toolchains/arm-none-eabi.cmake | |
| packages: gcc-arm-none-eabi libnewlib-arm-none-eabi | |
| artifact_suffix: arm-cortex-m | |
| - arch: aarch64-linux | |
| toolchain: toolchains/aarch64-linux-gnu.cmake | |
| packages: gcc-aarch64-linux-gnu | |
| artifact_suffix: aarch64-linux | |
| - arch: riscv64-linux | |
| toolchain: toolchains/riscv64-linux-gnu.cmake | |
| packages: gcc-riscv64-linux-gnu | |
| artifact_suffix: riscv64-linux | |
| - arch: arm-cortex-r5 | |
| toolchain: toolchains/arm-none-eabi-r5.cmake | |
| packages: gcc-arm-none-eabi libnewlib-arm-none-eabi | |
| artifact_suffix: arm-cortex-r5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install cross-compiler | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ${{ matrix.packages }} | |
| - name: Extract version | |
| id: version | |
| run: | | |
| TAG=${GITHUB_REF#refs/tags/} | |
| VERSION=${TAG#v} | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Cross-compile core libraries | |
| run: | | |
| cmake -B build-${{ matrix.arch }} \ | |
| -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} \ | |
| -DCMAKE_BUILD_TYPE=Release | |
| cmake --build build-${{ matrix.arch }} | |
| - name: Package artifacts | |
| run: | | |
| mkdir -p staging | |
| find build-${{ matrix.arch }} -name "*.a" -exec cp {} staging/ \; | |
| tar czf eboot-${{ steps.version.outputs.version }}-${{ matrix.artifact_suffix }}.tar.gz -C staging . | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: eboot-${{ matrix.artifact_suffix }} | |
| path: "*.tar.gz" | |
| release: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| needs: [validate, cross-compile] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Extract version | |
| id: version | |
| run: | | |
| TAG=${GITHUB_REF#refs/tags/} | |
| VERSION=${TAG#v} | |
| echo "tag=$TAG" >> $GITHUB_OUTPUT | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| IFS='.-' read -r MAJOR MINOR PATCH PRE <<< "$VERSION" | |
| echo "major=$MAJOR" >> $GITHUB_OUTPUT | |
| echo "minor=$MINOR" >> $GITHUB_OUTPUT | |
| echo "patch=$PATCH" >> $GITHUB_OUTPUT | |
| echo "prerelease=${PRE:-stable}" >> $GITHUB_OUTPUT | |
| - name: Generate changelog | |
| id: changelog | |
| run: | | |
| PREV_TAG=$(git tag --sort=-v:refname | head -2 | tail -1) | |
| if [ -n "$PREV_TAG" ] && [ "$PREV_TAG" != "${{ steps.version.outputs.tag }}" ]; then | |
| CHANGES=$(git log ${PREV_TAG}..HEAD --oneline --no-merges) | |
| else | |
| CHANGES=$(git log --oneline --no-merges -20) | |
| fi | |
| echo "changes<<EOF" >> $GITHUB_OUTPUT | |
| echo "$CHANGES" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| - name: Build native (x86_64) artifacts | |
| run: | | |
| cmake -B build -DCMAKE_BUILD_TYPE=Release | |
| cmake --build build | |
| mkdir -p staging | |
| find build -name "*.a" -exec cp {} staging/ \; | |
| tar czf eboot-${{ steps.version.outputs.version }}-linux-x86_64.tar.gz -C staging . | |
| - name: Download cross-compiled artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: eboot-* | |
| merge-multiple: true | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.version.outputs.tag }} | |
| name: "eboot ${{ steps.version.outputs.tag }}" | |
| body: | | |
| ## eboot ${{ steps.version.outputs.tag }} — Embedded Bootloader | |
| **Version:** ${{ steps.version.outputs.version }} | |
| **Type:** ${{ steps.version.outputs.prerelease }} | |
| ### Architectures | |
| | Archive | Target | | |
| |---|---| | |
| | `eboot-${{ steps.version.outputs.version }}-linux-x86_64.tar.gz` | x86_64 Linux (native) | | |
| | `eboot-${{ steps.version.outputs.version }}-arm-cortex-m.tar.gz` | ARM Cortex-M bare-metal (thumb, hard-float) | | |
| | `eboot-${{ steps.version.outputs.version }}-aarch64-linux.tar.gz` | AArch64 Linux (RPi 4/5, Jetson) | | |
| | `eboot-${{ steps.version.outputs.version }}-riscv64-linux.tar.gz` | RISC-V 64 Linux (SiFive) | | |
| | `eboot-${{ steps.version.outputs.version }}-arm-cortex-r5.tar.gz` | ARM Cortex-R5 bare-metal (TMS570, safety-critical) | | |
| ### Changes | |
| ${{ steps.changelog.outputs.changes }} | |
| ### Build from source | |
| ```bash | |
| cmake -B build -DEBLDR_BOARD=stm32f4 \ | |
| -DCMAKE_TOOLCHAIN_FILE=toolchains/arm-none-eabi.cmake | |
| cmake --build build | |
| ``` | |
| files: "*.tar.gz" | |
| draft: ${{ contains(steps.version.outputs.prerelease, 'debug') }} | |
| prerelease: ${{ contains(steps.version.outputs.prerelease, 'rc') || contains(steps.version.outputs.prerelease, 'beta') }} |