mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
feat(ci): dynamic solo firmware build workflow, add _solo_dual envs for Wio Tracker L1
- Add build-solo-firmwares.yml: auto-detects all _solo_dual envs from platformio.ini, builds in parallel, publishes uf2 files to draft release - Remove build-wio-tracker-l1-firmwares.yml (replaced by solo workflow) - Add WioTrackerL1_companion_solo_dual and WioTrackerL1Eink_companion_solo_dual envs - Wire build-solo-firmwares command in build.sh using _solo_dual suffix Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
95
.github/workflows/build-solo-firmwares.yml
vendored
Normal file
95
.github/workflows/build-solo-firmwares.yml
vendored
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
name: Build Solo Firmwares
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
env:
|
||||||
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
get-solo-envs:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
envs: ${{ steps.list-envs.outputs.envs }}
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Clone Repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: List solo_dual envs
|
||||||
|
id: list-envs
|
||||||
|
run: |
|
||||||
|
envs=$(grep '^\[env:' platformio.ini \
|
||||||
|
| sed 's/\[env://;s/\]//' \
|
||||||
|
| grep '_solo_dual$' \
|
||||||
|
| jq -R -s -c 'split("\n") | map(select(length > 0))')
|
||||||
|
echo "envs=$envs" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
build:
|
||||||
|
needs: get-solo-envs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
env: ${{ fromJson(needs.get-solo-envs.outputs.envs) }}
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Clone Repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Build Environment
|
||||||
|
uses: ./.github/actions/setup-build-environment
|
||||||
|
|
||||||
|
- name: Resolve build version
|
||||||
|
run: |
|
||||||
|
if [ "$GITHUB_REF_TYPE" = "tag" ]; then
|
||||||
|
echo "BUILD_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "BUILD_VERSION=dev-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Build Firmware
|
||||||
|
env:
|
||||||
|
FIRMWARE_VERSION: ${{ env.BUILD_VERSION }}
|
||||||
|
run: /usr/bin/env bash build.sh build-firmware ${{ matrix.env }}
|
||||||
|
|
||||||
|
- name: Rename firmware
|
||||||
|
run: |
|
||||||
|
DEVICE_NAME=$(echo "${{ matrix.env }}" | sed 's/_solo_dual$//' | tr '_' '-')
|
||||||
|
mv out/*.uf2 "out/solo-${{ env.BUILD_VERSION }}-${DEVICE_NAME}.uf2" 2>/dev/null || true
|
||||||
|
|
||||||
|
- name: Upload Firmware
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: solo-${{ matrix.env }}-firmware
|
||||||
|
path: out
|
||||||
|
|
||||||
|
release:
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Extract Version from Git Tag
|
||||||
|
run: echo "GIT_TAG_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Download all solo firmwares
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
pattern: solo-*-firmware
|
||||||
|
merge-multiple: true
|
||||||
|
path: out
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
name: Solo ${{ env.GIT_TAG_VERSION }}
|
||||||
|
body: ""
|
||||||
|
draft: true
|
||||||
|
files: out/*.uf2
|
||||||
108
.github/workflows/build-wio-tracker-l1-firmwares.yml
vendored
108
.github/workflows/build-wio-tracker-l1-firmwares.yml
vendored
@@ -1,108 +0,0 @@
|
|||||||
name: Build Wio Tracker L1 Firmwares
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
|
|
||||||
env:
|
|
||||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
build-oled:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Clone Repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Build Environment
|
|
||||||
uses: ./.github/actions/setup-build-environment
|
|
||||||
|
|
||||||
- name: Resolve build version
|
|
||||||
run: |
|
|
||||||
if [ "$GITHUB_REF_TYPE" = "tag" ]; then
|
|
||||||
echo "BUILD_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV
|
|
||||||
else
|
|
||||||
echo "BUILD_VERSION=dev-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Build Dual OLED Firmware
|
|
||||||
env:
|
|
||||||
FIRMWARE_VERSION: ${{ env.BUILD_VERSION }}
|
|
||||||
run: /usr/bin/env bash build.sh build-firmware WioTrackerL1_companion_dual
|
|
||||||
|
|
||||||
- name: Rename OLED firmware
|
|
||||||
run: mv out/*.uf2 "out/solo-${{ env.BUILD_VERSION }}-oled.uf2" 2>/dev/null || true
|
|
||||||
|
|
||||||
- name: Upload OLED Firmware
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: wio-tracker-l1-oled-firmware
|
|
||||||
path: out
|
|
||||||
|
|
||||||
build-eink:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Clone Repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Build Environment
|
|
||||||
uses: ./.github/actions/setup-build-environment
|
|
||||||
|
|
||||||
- name: Resolve build version
|
|
||||||
run: |
|
|
||||||
if [ "$GITHUB_REF_TYPE" = "tag" ]; then
|
|
||||||
echo "BUILD_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV
|
|
||||||
else
|
|
||||||
echo "BUILD_VERSION=dev-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Build Dual E-ink Firmware
|
|
||||||
env:
|
|
||||||
FIRMWARE_VERSION: ${{ env.BUILD_VERSION }}
|
|
||||||
run: /usr/bin/env bash build.sh build-firmware WioTrackerL1Eink_companion_dual
|
|
||||||
|
|
||||||
- name: Rename E-ink firmware
|
|
||||||
run: mv out/*.uf2 "out/solo-${{ env.BUILD_VERSION }}-eink.uf2" 2>/dev/null || true
|
|
||||||
|
|
||||||
- name: Upload E-ink Firmware
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: wio-tracker-l1-eink-firmware
|
|
||||||
path: out
|
|
||||||
|
|
||||||
release:
|
|
||||||
needs: [build-oled, build-eink]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Extract Version from Git Tag
|
|
||||||
run: echo "GIT_TAG_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Download OLED Firmware
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: wio-tracker-l1-oled-firmware
|
|
||||||
path: out
|
|
||||||
|
|
||||||
- name: Download E-ink Firmware
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: wio-tracker-l1-eink-firmware
|
|
||||||
path: out
|
|
||||||
|
|
||||||
- name: Create Release
|
|
||||||
uses: softprops/action-gh-release@v2
|
|
||||||
with:
|
|
||||||
name: Solo ${{ env.GIT_TAG_VERSION }}
|
|
||||||
body: ""
|
|
||||||
draft: true
|
|
||||||
files: out/*.uf2
|
|
||||||
10
build.sh
10
build.sh
@@ -14,6 +14,7 @@ Commands:
|
|||||||
build-companion-firmwares: Build all companion firmwares for all build targets.
|
build-companion-firmwares: Build all companion firmwares for all build targets.
|
||||||
build-repeater-firmwares: Build all repeater firmwares for all build targets.
|
build-repeater-firmwares: Build all repeater firmwares for all build targets.
|
||||||
build-room-server-firmwares: Build all chat room server firmwares for all build targets.
|
build-room-server-firmwares: Build all chat room server firmwares for all build targets.
|
||||||
|
build-solo-firmwares: Build all solo firmwares for all build targets.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
Build firmware for the "RAK_4631_repeater" device target
|
Build firmware for the "RAK_4631_repeater" device target
|
||||||
@@ -234,6 +235,13 @@ build_wio_tracker_l1_firmwares() {
|
|||||||
build_firmware "WioTrackerL1_companion_dual"
|
build_firmware "WioTrackerL1_companion_dual"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
build_solo_firmwares() {
|
||||||
|
# build_firmware "GAT562_30S_Mesh_Kit_solo_dual"
|
||||||
|
# build_firmware "WioTrackerL1_companion_dual"
|
||||||
|
# build_firmware "WioTrackerL1Eink_companion_dual"
|
||||||
|
build_all_firmwares_by_suffix "_solo_dual"
|
||||||
|
}
|
||||||
|
|
||||||
build_room_server_firmwares() {
|
build_room_server_firmwares() {
|
||||||
|
|
||||||
# # build specific room server firmwares
|
# # build specific room server firmwares
|
||||||
@@ -281,6 +289,8 @@ elif [[ $1 == "build-repeater-firmwares" ]]; then
|
|||||||
build_repeater_firmwares
|
build_repeater_firmwares
|
||||||
elif [[ $1 == "build-wio-tracker-l1-firmwares" ]]; then
|
elif [[ $1 == "build-wio-tracker-l1-firmwares" ]]; then
|
||||||
build_wio_tracker_l1_firmwares
|
build_wio_tracker_l1_firmwares
|
||||||
|
elif [[ $1 == "build-solo-firmwares" ]]; then
|
||||||
|
build_solo_firmwares
|
||||||
elif [[ $1 == "build-room-server-firmwares" ]]; then
|
elif [[ $1 == "build-room-server-firmwares" ]]; then
|
||||||
build_room_server_firmwares
|
build_room_server_firmwares
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -69,6 +69,13 @@ build_flags = ${WioTrackerL1Eink.build_flags}
|
|||||||
-D DUAL_SERIAL=1
|
-D DUAL_SERIAL=1
|
||||||
extra_scripts = post:create-uf2.py
|
extra_scripts = post:create-uf2.py
|
||||||
|
|
||||||
|
; Dual BLE+USB with added Solo
|
||||||
|
[env:WioTrackerL1Eink_companion_solo_dual]
|
||||||
|
extends = WioTrackerL1Eink
|
||||||
|
build_flags = ${WioTrackerL1Eink.build_flags}
|
||||||
|
-D DUAL_SERIAL=1
|
||||||
|
extra_scripts = post:create-uf2.py
|
||||||
|
|
||||||
; Dual BLE+USB with screenshot support (development/debug)
|
; Dual BLE+USB with screenshot support (development/debug)
|
||||||
[env:WioTrackerL1Eink_companion_dual_dev]
|
[env:WioTrackerL1Eink_companion_dual_dev]
|
||||||
extends = WioTrackerL1Eink
|
extends = WioTrackerL1Eink
|
||||||
|
|||||||
@@ -144,15 +144,18 @@ build_flags = ${WioTrackerL1CompanionBLE.build_flags}
|
|||||||
-D DUAL_SERIAL=1
|
-D DUAL_SERIAL=1
|
||||||
-UBLE_DEBUG_LOGGING
|
-UBLE_DEBUG_LOGGING
|
||||||
|
|
||||||
[env:WioTrackerL1_companion_radio_dual]
|
|
||||||
extends = WioTrackerL1CompanionDual
|
|
||||||
|
|
||||||
[env:WioTrackerL1_companion_dual]
|
[env:WioTrackerL1_companion_dual]
|
||||||
extends = WioTrackerL1CompanionDual
|
extends = WioTrackerL1CompanionDual
|
||||||
build_flags = ${WioTrackerL1CompanionDual.build_flags}
|
build_flags = ${WioTrackerL1CompanionDual.build_flags}
|
||||||
-D UI_HAS_JOYSTICK_UPDOWN=1
|
-D UI_HAS_JOYSTICK_UPDOWN=1
|
||||||
extra_scripts = post:create-uf2.py
|
extra_scripts = post:create-uf2.py
|
||||||
|
|
||||||
|
[env:WioTrackerL1_companion_solo_dual]
|
||||||
|
extends = WioTrackerL1CompanionDual
|
||||||
|
build_flags = ${WioTrackerL1CompanionDual.build_flags}
|
||||||
|
-D UI_HAS_JOYSTICK_UPDOWN=1
|
||||||
|
extra_scripts = post:create-uf2.py
|
||||||
|
|
||||||
[env:WioTrackerL1_companion_dual_dev]
|
[env:WioTrackerL1_companion_dual_dev]
|
||||||
extends = WioTrackerL1CompanionDual
|
extends = WioTrackerL1CompanionDual
|
||||||
build_flags = ${WioTrackerL1CompanionDual.build_flags}
|
build_flags = ${WioTrackerL1CompanionDual.build_flags}
|
||||||
|
|||||||
Reference in New Issue
Block a user