Skip to content

Remove deprecated firmware update methods #87

Remove deprecated firmware update methods

Remove deprecated firmware update methods #87

Workflow file for this run

name: Build and Release
on:
push:
branches: [main]
tags: ["v*"]
paths: ["firmware/**"]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
ARM_GNU_TOOLCHAIN_VERSION: 13.3.rel1
SIMPLICITY_SDK_VERSION: v2025.6.2
strategy:
matrix:
board: ["efr32xg22e", "rf-bm-bg22c3"]
steps:
# Checkout repository and submodules
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: true
# Set up dependencies
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y unzip wget
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: "corretto"
java-version: "21"
# Setup ARM GNU Toolchain
- name: Cache ARM GNU Toolchain
id: cache-arm-toolchain
uses: actions/cache@v4
with:
path: arm-gnu-toolchain-${{ env.ARM_GNU_TOOLCHAIN_VERSION }}-x86_64-arm-none-eabi
key: arm-toolchain-${{ env.ARM_GNU_TOOLCHAIN_VERSION }}
- name: Install ARM GNU Toolchain
if: steps.cache-arm-toolchain.outputs.cache-hit != 'true'
run: |
wget -q https://developer.arm.com/-/media/Files/downloads/gnu/${{ env.ARM_GNU_TOOLCHAIN_VERSION }}/binrel/arm-gnu-toolchain-${{ env.ARM_GNU_TOOLCHAIN_VERSION }}-x86_64-arm-none-eabi.tar.xz
tar xf arm-gnu-toolchain-${{ env.ARM_GNU_TOOLCHAIN_VERSION }}-x86_64-arm-none-eabi.tar.xz
- name: Add ARM GNU Toolchain to PATH
run: |
echo "$PWD/arm-gnu-toolchain-${{ env.ARM_GNU_TOOLCHAIN_VERSION }}-x86_64-arm-none-eabi/bin" >> $GITHUB_PATH
# Setup Simplicity SDK
- name: Cache Simplicity SDK
id: cache-simplicity-sdk
uses: actions/cache@v4
with:
path: simplicity_sdk
key: simplicity-sdk-${{ env.SIMPLICITY_SDK_VERSION }}
- name: Install Simplicity SDK
if: steps.cache-simplicity-sdk.outputs.cache-hit != 'true'
run: |
wget -q https://github.com/SiliconLabs/simplicity_sdk/releases/download/${{ env.SIMPLICITY_SDK_VERSION }}/simplicity-sdk.zip
unzip -q simplicity-sdk.zip -d simplicity_sdk
# Setup SLC-CLI
- name: Cache SLC-CLI
id: cache-slc-cli
uses: actions/cache@v4
with:
path: slc_cli
key: slc-cli-${{ runner.os }}
- name: Install SLC-CLI
if: steps.cache-slc-cli.outputs.cache-hit != 'true'
run: |
wget -q https://www.silabs.com/documents/login/software/slc_cli_linux.zip
unzip -q slc_cli_linux.zip
chmod +x slc_cli/slc
- name: Add SLC-CLI to PATH
run: |
echo "$PWD/slc_cli" >> $GITHUB_PATH
- name: Configure SLC-CLI
run: |
slc configuration --sdk simplicity_sdk
slc configuration --gcc-toolchain arm-gnu-toolchain-${{ env.ARM_GNU_TOOLCHAIN_VERSION }}-x86_64-arm-none-eabi
slc signature trust --sdk simplicity_sdk
# Setup Simplicity Commander
- name: Cache Simplicity Commander
id: cache-simplicity-commander
uses: actions/cache@v4
with:
path: commander
key: simplicity-commander-${{ runner.os }}
- name: Install Simplicity Commander
if: steps.cache-simplicity-commander.outputs.cache-hit != 'true'
run: |
wget -q https://www.silabs.com/documents/login/software/SimplicityCommander-Linux.zip
unzip -q SimplicityCommander-Linux.zip
tar -xf SimplicityCommander-Linux/Commander_linux_x86_64_*.tar.bz
- name: Add Simplicity Commander to PATH
run: |
echo "$PWD/commander" >> $GITHUB_PATH
# Build bootloader
- name: Generate bootloader project files
working-directory: firmware/bootloader
run: |
slc generate bootloader.slcp \
--with "${{ matrix.board }};wavephoenix" \
--sdk-extensions=../boards \
-o makefile \
-d target/${{ matrix.board }}
- name: Build bootloader
working-directory: firmware/bootloader
run: |
make -C target/${{ matrix.board }} -f bootloader.Makefile release
# Build firmware
- name: Generate app firmware project files
working-directory: firmware/app
run: |
slc generate wavephoenix.slcp \
--with "${{ matrix.board }};wavephoenix" \
--sdk-extensions=../boards,../libjoybus,../libwavebird \
-o makefile \
-d target/${{ matrix.board }}
- name: Build app firmware
working-directory: firmware/app
run: |
make -C target/${{ matrix.board }} -f wavephoenix.Makefile release
- name: Generate app firmware .gbl
working-directory: firmware/app/target/${{ matrix.board }}/build/release
run: |
commander gbl create \
--app wavephoenix.s37 \
wavephoenix.gbl
# Upload artifacts
- name: Rename artifacts
run: |
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
VERSION=${GITHUB_REF_NAME}
else
VERSION="trunk"
fi
mv firmware/bootloader/target/${{ matrix.board }}/build/release/bootloader.hex "wavephoenix-bootloader-${VERSION}-${{ matrix.board }}.hex"
mv firmware/app/target/${{ matrix.board }}/build/release/wavephoenix.hex "wavephoenix-receiver-${VERSION}-${{ matrix.board }}.hex"
mv firmware/app/target/${{ matrix.board }}/build/release/wavephoenix.gbl "wavephoenix-receiver-${VERSION}-${{ matrix.board }}.gbl"
- name: Update trunk tag
if: github.ref == 'refs/heads/main'
run: |
git tag -f trunk
git push -f origin trunk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifacts to trunk release
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2
with:
files: |
wavephoenix-bootloader-*.hex
wavephoenix-receiver-*.hex
wavephoenix-receiver-*.gbl
tag_name: trunk
name: Trunk Builds
body: Automated build from main branch, not guaranteed to be stable.
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifacts to tagged release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: |
wavephoenix-bootloader-*.hex
wavephoenix-receiver-*.hex
wavephoenix-receiver-*.gbl
tag_name: ${{ github.ref }}
name: ${{ github.ref_name }}
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}