Skip to content

Build firmware images #460

Build firmware images

Build firmware images #460

Workflow file for this run

name: Build firmware images
on:
workflow_dispatch:
pull_request:
workflow_run:
workflows: [Test suite based on Wokwi CLI]
types:
- completed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
variant:
- hardware-rev0-it_IT
- hardware-rev0-en_US
- esp32-devboard
- wokwi
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
~/.platformio/packages
.pio/build_cache
key: ${{ runner.os }}-build-${{ matrix.variant }}
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Use secrets.hpp.example as base for the build
run: cp conf/secrets.hpp.example conf/secrets.hpp
- name: Build PlatformIO Project ${{ matrix.variant }}
run: pio run --environment ${{ matrix.variant }}
- name: Set sha_short variable
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Upload firmware image for ${{ matrix.variant }}
uses: actions/upload-artifact@v4
with:
name: FW-${{ matrix.variant }}-${{ steps.vars.outputs.sha_short }}
path: |
.pio/build/${{ matrix.variant }}/firmware.bin
.pio/build/${{ matrix.variant }}/firmware_metrics.txt
retention-days: 90