From d0ee2860a329da22348e8b1e2ec5ebfa6990c15f Mon Sep 17 00:00:00 2001 From: Cameron Brooks Date: Tue, 14 Jul 2026 23:22:57 -0400 Subject: [PATCH] ci: build firmware for all board variants on firmware changes The existing CI validates slice.yaml only - firmware changes merged with no build check at all, which is how a build-breaking change could land silently (the anolis bench campaign's padded-read regression era made the gap visible). Build all four board variants (gen1/gen2 x nano/nanoevery) via PlatformIO on any firmware/ change, with the PlatformIO toolchain cached. --- .github/workflows/firmware-build.yml | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/firmware-build.yml diff --git a/.github/workflows/firmware-build.yml b/.github/workflows/firmware-build.yml new file mode 100644 index 0000000..489c1d2 --- /dev/null +++ b/.github/workflows/firmware-build.yml @@ -0,0 +1,41 @@ +name: Firmware Build + +on: + push: + branches: [main] + paths: + - "firmware/**" + - ".github/workflows/firmware-build.yml" + pull_request: + paths: + - "firmware/**" + - ".github/workflows/firmware-build.yml" + workflow_dispatch: + +jobs: + build: + name: pio run (${{ matrix.env }}) + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + env: [gen1_nano, gen2_nano, gen1_nanoevery, gen2_nanoevery] + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Cache PlatformIO + uses: actions/cache@v4 + with: + path: ~/.platformio + key: pio-${{ runner.os }}-${{ matrix.env }}-${{ hashFiles('firmware/platformio.ini') }} + + - name: Install PlatformIO + run: pip install platformio + + - name: Build + working-directory: firmware + run: pio run -e ${{ matrix.env }}