44 schedule :
55 - cron : ' 0 0 * * *'
66jobs :
7- build-upload :
7+ build :
8+ strategy :
9+ fail-fast : false
10+ matrix :
11+ environments :
12+ - " rfbridge"
13+ - " rfbridge-direct"
14+ - " theengs-bridge"
15+ - " theengs-bridge-v11"
16+ - " theengs-plug"
17+ - " esp32dev-all-test"
18+ - " esp32dev-rf"
19+ - " esp32dev-pilight"
20+ - " esp32dev-pilight-cc1101"
21+ - " esp32dev-somfy-cc1101"
22+ - " esp32dev-pilight-somfy-cc1101"
23+ - " esp32dev-weatherstation"
24+ - " esp32dev-gf-sun-inverter"
25+ - " esp32dev-ir"
26+ - " esp32dev-ble"
27+ - " esp32dev-ble-broker"
28+ - " esp32dev-ble-mqtt-undecoded"
29+ - " esp32dev-ble-aws"
30+ - " esp32feather-ble"
31+ - " esp32-lolin32lite-ble"
32+ - " esp32-olimex-gtw-ble-eth"
33+ - " esp32-olimex-gtw-ble-poe"
34+ - " esp32-olimex-gtw-ble-poe-iso"
35+ - " esp32-wt32-eth01-ble-eth"
36+ - " esp32-olimex-gtw-ble-wifi"
37+ - " esp32-m5stick-ble"
38+ - " esp32-m5stack-ble"
39+ - " esp32-m5tough-ble"
40+ - " esp32-m5stick-c-ble"
41+ - " esp32-m5stick-cp-ble"
42+ - " esp32-m5atom-matrix"
43+ - " esp32-m5atom-lite"
44+ - " esp32doitv1-aithinker-r01-sx1278"
45+ - " esp32dev-rtl_433"
46+ - " esp32dev-rtl_433-fsk"
47+ - " heltec-rtl_433"
48+ - " heltec-rtl_433-fsk"
49+ - " heltec-ble"
50+ - " lilygo-rtl_433"
51+ - " lilygo-rtl_433-fsk"
52+ - " lilygo-t3-s3-rtl_433"
53+ - " lilygo-t3-s3-rtl_433-fsk"
54+ - " lilygo-ble"
55+ - " esp32dev-multi_receiver"
56+ - " esp32dev-multi_receiver-pilight"
57+ - " tinypico-ble"
58+ - " ttgo-lora32-v1"
59+ - " ttgo-lora32-v21"
60+ - " ttgo-t-beam"
61+ - " heltec-wifi-lora-32"
62+ - " shelly-plus1"
63+ - " nodemcuv2-all-test"
64+ - " nodemcuv2-fastled-test"
65+ - " nodemcuv2-2g"
66+ - " nodemcuv2-ir"
67+ - " nodemcuv2-serial"
68+ - " avatto-bakeey-ir"
69+ - " nodemcuv2-rf"
70+ - " nodemcuv2-rf-cc1101"
71+ - " nodemcuv2-somfy-cc1101"
72+ - " manual-wifi-test"
73+ - " rf-wifi-gateway"
74+ - " nodemcuv2-rf2"
75+ - " nodemcuv2-rf2-cc1101"
76+ - " nodemcuv2-pilight"
77+ - " nodemcuv2-weatherstation"
78+ - " sonoff-basic"
79+ - " sonoff-basic-rfr3"
80+ - " esp32dev-ble-datatest"
81+ - " esp32s3-dev-c1-ble"
82+ - " esp32s3-m5stack-stamps3"
83+ - " esp32s3-atomS3U"
84+ - " esp32c3-dev-m1-ble"
85+ - " airm2m_core_esp32c3"
86+ - " esp32c3-dev-c2-ble"
87+ - " esp32c3-dev-c2-ble-no-serial"
88+ - " esp32c3_lolin_mini"
89+ - " esp32c3_lolin_mini_with_serial"
90+ - " esp32c3-m5stamp"
91+ - " esp32c3u-m5stamp"
92+ - " thingpulse-espgateway"
93+ - " esp32dev-ble-idf"
894 runs-on : ubuntu-latest
995 if : github.repository_owner == '1technophile'
10- name : Build and upload Assets to Release
96+ name : Build ${{ matrix.environments }}
1197 steps :
1298 - uses : actions/checkout@v4
1399 - uses : benjlevesque/short-sha@v2.1
@@ -29,23 +115,88 @@ jobs:
29115 - name : Set sha tag
30116 run : |
31117 sed -i "s/version_tag/${{ steps.short-sha.outputs.sha }}/g" main/User_config.h scripts/latest_version_dev.json
32- sed -i "s/version_tag/DEVELOPMENT SHA:${{ steps.short-sha.outputs.sha }} TEST ONLY/g" docs/.vuepress/config.js
33- sed -i "s|base: '/'|base: '/dev/'|g" docs/.vuepress/config.js
34- - name : Extract ESP32 platform version from platformio.ini
35- run : |
36- ESP32_VERSION=$(grep 'esp32_platform\s*=' platformio.ini | cut -d'@' -f2 | tr -d '[:space:]')
37- echo "ESP32_PLATFORM_VERSION=${ESP32_VERSION}" >> $GITHUB_ENV
38118 - name : Run PlatformIO
39119 env :
40120 PYTHONIOENCODING : utf-8
41121 PYTHONUTF8 : ' 1'
42122 run : |
43123 export PLATFORMIO_BUILD_FLAGS="'-DDEVELOPMENTOTA=true'"
44- platformio run
45- - name : Prepare Release Assets
124+ platformio run -e ${{ matrix.environments }}
125+ - name : Prepare firmware artifacts
126+ run : |
127+ mkdir -p firmware
128+ cp .pio/build/${{ matrix.environments }}/firmware.bin firmware/${{ matrix.environments }}-firmware.bin
129+ if [ -f .pio/build/${{ matrix.environments }}/partitions.bin ]; then
130+ cp .pio/build/${{ matrix.environments }}/partitions.bin firmware/${{ matrix.environments }}-partitions.bin
131+ fi
132+ - name : Upload firmware
133+ uses : actions/upload-artifact@v4
134+ with :
135+ name : firmware-${{ matrix.environments }}
136+ path : firmware/
137+ retention-days : 1
138+
139+ deploy :
140+ needs : build
141+ runs-on : ubuntu-latest
142+ if : github.repository_owner == '1technophile'
143+ name : Deploy binaries and docs
144+ steps :
145+ - uses : actions/checkout@v4
146+ - uses : benjlevesque/short-sha@v2.1
147+ id : short-sha
148+ with :
149+ length : 6
150+ - name : Download all firmware artifacts
151+ uses : actions/download-artifact@v4
152+ with :
153+ pattern : firmware-*
154+ path : toDeploy
155+ merge-multiple : true
156+ - name : Set up Python
157+ uses : actions/setup-python@v5
158+ with :
159+ python-version : " 3.13"
160+ - name : Install uv
161+ uses : astral-sh/setup-uv@v6
162+ with :
163+ version : " latest"
164+ enable-cache : false
165+ - name : Install dependencies
166+ run : |
167+ uv pip install --system -U https://github.com/pioarduino/platformio-core/archive/refs/tags/v6.1.18.zip
168+ - name : Create library zips
169+ run : |
170+ # Install libraries for a representative environment to get libdeps
171+ platformio pkg install -e esp32dev-ble --no-save
172+ cd .pio/libdeps
173+ # Replace spaces with underscores in folder names
174+ find . -type d -name "* *" | while read FNAME; do mv "$FNAME" "${FNAME// /_}"; done
175+ # Zip libraries per board
176+ for i in */; do
177+ zip -r "${i%/}-libraries.zip" "$i"
178+ done
179+ mv *.zip ../../toDeploy/
180+ - name : Prepare additional assets
46181 run : |
47- sudo apt install rename
48- ./scripts/prepare_deploy.sh
182+ cd toDeploy
183+ # Remove binaries for *-all*, *-test* env
184+ rm -f *-all*.bin *-test*.bin *-test*.zip || true
185+ # Rename firmware files to match expected format
186+ for f in *-firmware.bin; do
187+ [ -f "$f" ] && mv "$f" "${f/-firmware/}"
188+ done
189+ for f in *-partitions.bin; do
190+ [ -f "$f" ] && mv "$f" "${f/-partitions/-partitions}"
191+ done
192+ cd ..
193+ # Zip source code
194+ zip -r toDeploy/OpenMQTTGateway_sources.zip main LICENSE.txt
195+ ls -lA toDeploy/
196+ - name : Set sha tag for docs
197+ run : |
198+ sed -i "s/version_tag/DEVELOPMENT SHA:${{ steps.short-sha.outputs.sha }} TEST ONLY/g" docs/.vuepress/config.js
199+ sed -i "s|base: '/'|base: '/dev/'|g" docs/.vuepress/config.js
49200 - name : Set up Node.js
50201 uses : actions/setup-node@v4
51202 with :
56207 - name : Build documentation
57208 run : |
58209 python ./scripts/gen_wu.py --dev
210+ npm install
59211 npm run docs:build
60212 - name : Deploy to GitHub Pages
61213 uses : peaceiris/actions-gh-pages@v3
0 commit comments