Skip to content

Build Firmware

Build Firmware #3

Workflow file for this run

name: Build Firmware
on:
workflow_dispatch:
# NOTE: push trigger intentionally removed. The firmware is already built and
# committed; auto-rebuilding on every push wastes ~15 min and always fails at the
# "Commit changes" step because the fork's Actions token is read-only.
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y make python3 yq unzip wget gcc-arm-none-eabi
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Cache Silicon Labs Tools
uses: actions/cache@v3
with:
path: silabs_tools
key: silabs-tools-2025.6.2
- name: Cache Telink Tools
uses: actions/cache@v3
with:
path: telink_tools
key: telink-tools-v3.7.2.0
- name: Cache Python Virtual Environment
uses: actions/cache@v3
with:
path: .venv
key: python-venv-${{ hashFiles('requirements.txt') }}
- name: Install SDK and Toolchain
run: |
make setup || (
echo "dumping log:" &&
cat /home/runner/work/tuya-zigbee-switch/tuya-zigbee-switch/silabs_tools/slc-cli/bin/slc-cli/configuration/*.log
)
- name: Clear out index files
run: |
source .venv/bin/activate
make tools/clean_z2m_index
- name: Build 4-gang firmware (SWITCH_BSEED_TS0726_4GANG, router)
run: |
source .venv/bin/activate
BOARD=SWITCH_BSEED_TS0726_4GANG DEVICE_TYPE=router make board/build
echo "=== built files ==="
ls -l bin/router/SWITCH_BSEED_TS0726_4GANG/
- name: Upload firmware artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: bseed-4gang-pr380
path: |
bin/router/SWITCH_BSEED_TS0726_4GANG/
zigbee2mqtt/ota/index_router.json
if-no-files-found: warn
- name: Update Z2M converters
run: |
source .venv/bin/activate
make tools/update_converters
- name: Update ZHA quirks
run: |
source .venv/bin/activate
make tools/update_zha_quirk
- name: Update HOMEd extensions
run: |
source .venv/bin/activate
make tools/update_homed_extension
- name: Update supported_devices.md
run: |
source .venv/bin/activate
make tools/update_supported_devices
- name: Commit changes
run: |
source .venv/bin/activate
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git add bin/* zigbee2mqtt/* zha/* homed/* docs/supported_devices.md
git diff --cached --quiet || git commit -m "Update firmware files, converters, quirks, extensions and supported devices list"
make tools/freeze_ota_links
git add zigbee2mqtt/*
git diff --cached --quiet || git commit -m "Freeze links in OTA index files"
git push