Skip to content

Publish firmware binary artifacts #133

Publish firmware binary artifacts

Publish firmware binary artifacts #133

Workflow file for this run

name: Firmware
on: [push, pull_request, merge_group]
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
firmware-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target-board:
- 'cynthion'
- 'samd11_xplained'
- 'qtpy'
steps:
- name: Install ARM GCC
uses: carlosperate/arm-none-eabi-gcc-action@v1
- name: Checkout source code
uses: actions/checkout@v4
with:
submodules: true
- name: Build Apollo firmware for ${{ matrix.target-board }}
run: |
# fetch to enable `git describe` used for firmware version string
TAG=$(git ls-remote origin "refs/tags/*[0-9]" | cut -f 2- | sort -V | tail -1)
[ -n "$TAG" ] && git fetch --filter=tree:0 --shallow-exclude $TAG origin $BRANCH_NAME
[ -n "$TAG" ] && git fetch --filter=tree:0 --deepen=1 origin $BRANCH_NAME
[ -n "$TAG" ] && git fetch --filter=tree:0 --depth=1 origin $TAG:$TAG
cd firmware
APOLLO_BOARD=${{ matrix.target-board }} make get-deps all
# Publish bootloader binary for latest Cynthion hardware revision
- name: Publish Artifacts
uses: actions/upload-artifact@v4
with:
name: firmware-binaries
path: |
firmware/_build/cynthion_d11/firmware.bin
firmware/_build/cynthion_d11/firmware.elf
if: matrix.target-board == 'cynthion'