mirror of
https://github.com/Colorado-Mesh/meshcore-bot-firmware.git
synced 2026-08-11 08:10:29 +00:00
GitHub deprecated Node.js 20 for actions; runners will force Node 24 by June 2 2026. Opting in now via the documented FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 env var instead of pinning every action version. Applied to both firmware-build (PR check) and release (tag-driven) workflows.
71 lines
1.8 KiB
YAML
71 lines
1.8 KiB
YAML
name: Firmware Build
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
env:
|
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
|
|
jobs:
|
|
representative-build:
|
|
name: Representative build (Heltec V3, RAK 4631)
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Cache PlatformIO
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cache/pip
|
|
~/.platformio/.cache
|
|
key: ${{ runner.os }}-pio-${{ hashFiles('vendor/MeshCore/platformio.ini', 'vendor/MeshCore/variants/**/platformio.ini') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pio-
|
|
|
|
- name: Install Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install PlatformIO
|
|
run: python3 -m pip install --upgrade platformio
|
|
|
|
- name: Apply MeshCore patches
|
|
run: bash scripts/apply-patches.sh
|
|
|
|
- name: Run host tests and safety checks
|
|
run: MESHCORE_SKIP_APPLY_PATCHES=1 bash scripts/verify.sh --no-build
|
|
|
|
- name: Build representative firmware
|
|
run: |
|
|
MESHCORE_SKIP_APPLY_PATCHES=1 \
|
|
SIZE_REPORT=out/size/report.txt \
|
|
bash scripts/build-representative.sh --baseline
|
|
|
|
- name: Upload size reports
|
|
uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: representative-size-reports
|
|
path: out/size
|
|
|
|
- name: Upload firmware artifacts
|
|
uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: representative-firmware
|
|
path: out/firmware
|