Skip to content

Firmware build

Firmware build #449

Workflow file for this run

name: Firmware build
on:
push:
schedule:
- cron: '0 4 * * *'
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board:
- ble_pulse_encoder
- ble_pulse_encoder@J
- darfon
- ds2_retrofit
- kbd_matrix
- mimxrt1010_evk
- negcon_retro
- nrf52840dongle
- nrf52dk/nrf52832
- paw_g3
- paw_pogo
- paw_testboard
- ploopy_mouse_nrf
- pmw_testboard
- zalpakka
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Zephyr project
uses: zephyrproject-rtos/action-zephyr-setup@main
with:
app-path: firmware
toolchains: arm-zephyr-eabi
- name: Set the normalized board name
run: |
echo "BOARD_NORM=$( echo ${{ matrix.board }} | sed 's/@.*$//' | tr '[:lower:]' '[:upper:]' )" >> $GITHUB_ENV
echo "BOARD=$(sed 's/\//_/' <<< ${{ matrix.board }})" >> $GITHUB_ENV
- name: Save the MCUboot key
env:
MCUBOOT_SIGNATURE_KEY: ${{ secrets[format('MCUBOOT_SIGNATURE_KEY_{0}', env.BOARD_NORM)] }}
if: ${{ env.MCUBOOT_SIGNATURE_KEY != '' }}
run: |
cat > mcuboot-signature-key.pem <<< $MCUBOOT_SIGNATURE_KEY
- name: Build
run: |
if [ -f mcuboot-signature-key.pem ]; then
EXTRA_ARGS=-DCONFIG_MCUBOOT_SIGNATURE_KEY_FILE="\"mcuboot-signature-key.pem\""
fi
echo west build -b ${{ matrix.board }} firmware -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y $EXTRA_ARGS
west build -b ${{ matrix.board }} firmware -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y $EXTRA_ARGS
- name: Firmware artifact
uses: actions/upload-artifact@v4
with:
name: firmware_${{ env.BOARD }}
path: |
build/zephyr/zephyr.elf
build/zephyr/zephyr.hex
build/zephyr/zephyr.bin
build/zephyr/zephyr.signed.hex
build/zephyr/zephyr.signed.bin