Files
mesh-forge/.github/workflows/custom_build.yml
Ben Allfree 2aec7c72dd wip
2025-11-22 09:17:20 -08:00

66 lines
1.8 KiB
YAML

name: Custom Firmware Build
on:
workflow_dispatch:
inputs:
target:
description: 'Target board (e.g. rak4631)'
required: true
type: string
flags:
description: 'Build flags (e.g. -DMESHTASTIC_EXCLUDE_MQTT)'
required: false
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Web Flasher (this repo)
uses: actions/checkout@v4
- name: Checkout Firmware
uses: actions/checkout@v4
with:
repository: meshtastic/firmware
ref: develop
path: firmware
submodules: recursive
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install platformio
- name: Build Firmware
working-directory: firmware
run: |
echo "Building for target: ${{ inputs.target }}"
echo "Flags: ${{ inputs.flags }}"
# Inject flags into platformio.ini or environment if needed
# For now, we rely on PIO's ability to take env vars or just run the target
# Real implementation might need more complex flag handling
# Example: export PLATFORMIO_BUILD_FLAGS="${{ inputs.flags }}"
pio run -e ${{ inputs.target }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: firmware-${{ inputs.target }}
path: firmware/.pio/build/${{ inputs.target }}/firmware.bin
- name: Notify Convex
if: always()
run: |
# TODO: Send webhook to Convex with status
echo "Build finished with status: ${{ job.status }}"