@@ -97,11 +97,13 @@ jobs:
97
97
run : |
98
98
mkdir sonarqube-out
99
99
./sonarqube/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir sonarqube-out \
100
- platformio ci --build-dir=" ./bin" --keep-build-dir --project-conf= platformio.ini ./src/
100
+ platformio ci --environment obspro --environment obs -- build-dir ./bin --keep-build-dir --project-conf platformio.ini ./src/
101
101
102
- - name : Package firmware
102
+ - name : Package firmware OBS classic
103
103
run : |
104
104
set -eux
105
+ mkdir -p obs-classic
106
+ cd obs-classic
105
107
if [ -f "/github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_40m.elf" ]; then
106
108
cp /github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_40m.elf 0x01000.elf
107
109
elif [ -f "/github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin" ]; then
@@ -112,10 +114,10 @@ jobs:
112
114
find /github/home/.platformio/ -name "bootloader*.elf"
113
115
exit 1
114
116
fi
115
- cp bin/.pio/build/esp32dev /partitions.bin 0x08000.bin
117
+ cp ../ bin/.pio/build/obs /partitions.bin 0x08000.bin
116
118
cp /github/home/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin 0x0e000.bin
117
- cp bin/.pio/build/esp32dev /firmware.bin 0x10000.bin
118
- cp bin/.pio/build/esp32dev /firmware.bin firmware.bin
119
+ cp ../ bin/.pio/build/obs /firmware.bin 0x10000.bin
120
+ cp ../ bin/.pio/build/obs /firmware.bin firmware.bin
119
121
ESPTOOL=/github/home/.platformio/packages/tool-esptoolpy/esptool.py
120
122
chmod +x ${ESPTOOL}
121
123
# CMD to create a merged binary (still missing flash.app)
@@ -138,16 +140,73 @@ jobs:
138
140
0x01000 0x01000.bin.org
139
141
echo OpenBikeSensor bootloader params
140
142
${ESPTOOL} --chip esp32 image_info --version 2 0x01000.bin || echo image_info failed
141
- cp src/fonts/LICENSE.txt LICENSE-OpenSans.txt
143
+ cp ../ src/fonts/LICENSE.txt LICENSE-OpenSans.txt
142
144
wget --no-verbose -O COPYRIGHT-ESP.html https://docs.espressif.com/projects/esp-idf/en/latest/esp32/COPYRIGHT.html
143
145
wget --no-verbose -O LICENSE-ARDUINO-ESP32.md https://github.com/espressif/arduino-esp32/raw/master/LICENSE.md
144
- zip --junk-paths obs-${{ env.OBS_VERSION }}-initial-flash.zip \
146
+ zip --junk-paths ../ obs-${{ env.OBS_VERSION }}-initial-flash.zip \
145
147
0x*.bin \
146
148
COPYRIGHT-ESP.html \
147
149
LICENSE-ARDUINO-ESP32.md \
148
150
LICENSE-OpenSans.txt \
149
151
LICENSE
150
- zip --junk-paths obs-${{ env.OBS_VERSION }}.zip \
152
+ zip --junk-paths ../obs-${{ env.OBS_VERSION }}.zip \
153
+ firmware.bin \
154
+ COPYRIGHT-ESP.html \
155
+ LICENSE-ARDUINO-ESP32.md \
156
+ LICENSE-OpenSans.txt \
157
+ LICENSE
158
+
159
+ - name : Package firmware OBS pro
160
+ run : |
161
+ set -eux
162
+ mkdir -p obs-pro
163
+ cd obs-pro
164
+ if [ -f "/github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_40m.elf" ]; then
165
+ cp /github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/bin/bootloader_dio_40m.elf 0x01000.elf
166
+ elif [ -f "/github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin" ]; then
167
+ cp /github/home/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin 0x01000.bin
168
+ else
169
+ echo could not find bootloader_dio_40m.bin, new location?
170
+ find /github/home/.platformio/ -name "bootloader*.bin"
171
+ find /github/home/.platformio/ -name "bootloader*.elf"
172
+ exit 1
173
+ fi
174
+ cp ../bin/.pio/build/obspro/partitions.bin 0x08000.bin
175
+ cp /github/home/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin 0x0e000.bin
176
+ cp ../bin/.pio/build/obspro/firmware.bin 0x10000.bin
177
+ cp ../bin/.pio/build/obspro/firmware.bin firmware.bin
178
+ ESPTOOL=/github/home/.platformio/packages/tool-esptoolpy/esptool.py
179
+ chmod +x ${ESPTOOL}
180
+ # CMD to create a merged binary (still missing flash.app)
181
+ # ${ESPTOOL} --trace --chip esp32 merge_bin --output merged.bin \
182
+ # --flash_freq keep --flash_mode dio --flash_size 4MB \
183
+ # 0x01000 0x01000.bin \
184
+ # 0x08000 0x08000.bin \
185
+ # 0x0e000 0x0e000.bin \
186
+ # 0x10000 0x10000.bin
187
+ ${ESPTOOL} --trace --chip esp32 elf2image \
188
+ --dont-append-digest \
189
+ --flash_freq 40m --flash_mode dio \
190
+ 0x01000.elf
191
+ echo Original bootloader params after elf2image
192
+ ${ESPTOOL} --chip esp32 image_info --version 2 0x01000.bin || echo image_info for converted bootloader failed
193
+ mv 0x01000.bin 0x01000.bin.org
194
+ ${ESPTOOL} --trace --chip esp32 merge_bin --output 0x01000.bin \
195
+ --flash_freq 40m --flash_mode dio --flash_size 4MB \
196
+ --target-offset 0x01000 \
197
+ 0x01000 0x01000.bin.org
198
+ echo OpenBikeSensor bootloader params
199
+ ${ESPTOOL} --chip esp32 image_info --version 2 0x01000.bin || echo image_info failed
200
+ cp ../src/fonts/LICENSE.txt LICENSE-OpenSans.txt
201
+ wget --no-verbose -O COPYRIGHT-ESP.html https://docs.espressif.com/projects/esp-idf/en/latest/esp32/COPYRIGHT.html
202
+ wget --no-verbose -O LICENSE-ARDUINO-ESP32.md https://github.com/espressif/arduino-esp32/raw/master/LICENSE.md
203
+ zip --junk-paths ../obspro-${{ env.OBS_VERSION }}-initial-flash.zip \
204
+ 0x*.bin \
205
+ COPYRIGHT-ESP.html \
206
+ LICENSE-ARDUINO-ESP32.md \
207
+ LICENSE-OpenSans.txt \
208
+ LICENSE
209
+ zip --junk-paths ../obspro-${{ env.OBS_VERSION }}.zip \
151
210
firmware.bin \
152
211
COPYRIGHT-ESP.html \
153
212
LICENSE-ARDUINO-ESP32.md \
@@ -186,26 +245,50 @@ jobs:
186
245
with :
187
246
name : obs-${{ env.OBS_VERSION }}
188
247
path : |
189
- firmware.bin
190
- COPYRIGHT-ESP.html
191
- LICENSE-ARDUINO-ESP32.md
192
- LICENSE-OpenSans.txt
193
- LICENSE
248
+ obs-classic/ firmware.bin
249
+ obs-classic/ COPYRIGHT-ESP.html
250
+ obs-classic/ LICENSE-ARDUINO-ESP32.md
251
+ obs-classic/ LICENSE-OpenSans.txt
252
+ obs-classic/ LICENSE
194
253
if-no-files-found : error
195
254
196
255
- name : Upload Build Asset Initial Flash
197
256
uses : actions/upload-artifact@v4
198
257
with :
199
258
name : obs-${{ env.OBS_VERSION }}-initial-flash
200
259
path : |
201
- 0x*.bin
202
- COPYRIGHT-ESP.html
203
- LICENSE-ARDUINO-ESP32.md
204
- LICENSE-OpenSans.txt
205
- LICENSE
260
+ obs-classic/ 0x*.bin
261
+ obs-classic/ COPYRIGHT-ESP.html
262
+ obs-classic/ LICENSE-ARDUINO-ESP32.md
263
+ obs-classic/ LICENSE-OpenSans.txt
264
+ obs-classic/ LICENSE
206
265
sonarqube-out/build-wrapper-dump.json
207
266
if-no-files-found : error
208
267
268
+ - name : Upload Build Asset obspro
269
+ uses : actions/upload-artifact@v4
270
+ with :
271
+ name : obspro-${{ env.OBS_VERSION }}
272
+ path : |
273
+ obs-pro/firmware.bin
274
+ obs-pro/COPYRIGHT-ESP.html
275
+ obs-pro/LICENSE-ARDUINO-ESP32.md
276
+ obs-pro/LICENSE-OpenSans.txt
277
+ obs-pro/LICENSE
278
+ if-no-files-found : error
279
+
280
+ - name : Upload Build Asset Initial Flash obspro
281
+ uses : actions/upload-artifact@v4
282
+ with :
283
+ name : obspro-${{ env.OBS_VERSION }}-initial-flash
284
+ path : |
285
+ obs-pro/0x*.bin
286
+ obs-pro/COPYRIGHT-ESP.html
287
+ obs-pro/LICENSE-ARDUINO-ESP32.md
288
+ obs-pro/LICENSE-OpenSans.txt
289
+ obs-pro/LICENSE
290
+ if-no-files-found : error
291
+
209
292
- name : Generate changelog
210
293
id : changelog
211
294
if : ${{ env.OBS_PREPARE_RELEASE == 'true' }}
@@ -275,6 +358,42 @@ jobs:
275
358
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
276
359
with :
277
360
upload_url : ${{ steps.create_release.outputs.upload_url }}
278
- asset_path : ./bin/.pio/build/esp32dev /firmware.bin
361
+ asset_path : ./bin/.pio/build/obs /firmware.bin
279
362
asset_name : firmware.bin
280
363
asset_content_type : application/x-esp32
364
+
365
+ - name : Upload Release Asset obspro
366
+ id : upload-release-asset
367
+ if : ${{ env.OBS_PREPARE_RELEASE == 'true' }}
368
+ uses : actions/upload-release-asset@v1
369
+ env :
370
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
371
+ with :
372
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
373
+ asset_path : ./obspro-${{ env.OBS_VERSION }}.zip
374
+ asset_name : obspro-${{ env.OBS_VERSION }}.zip
375
+ asset_content_type : application/zip
376
+
377
+ - name : Upload Release Asset Initial Flash pro
378
+ id : upload-release-asset-initial-flash
379
+ if : ${{ env.OBS_PREPARE_RELEASE == 'true' }}
380
+ uses : actions/upload-release-asset@v1
381
+ env :
382
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
383
+ with :
384
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
385
+ asset_path : ./obspro-${{ env.OBS_VERSION }}-initial-flash.zip
386
+ asset_name : obspro-${{ env.OBS_VERSION }}-initial-flash.zip
387
+ asset_content_type : application/zip
388
+
389
+ - name : Upload Release Asset app bin pro
390
+ id : upload-release-asset-app-bin
391
+ if : ${{ env.OBS_PREPARE_RELEASE == 'true' }}
392
+ uses : actions/upload-release-asset@v1
393
+ env :
394
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
395
+ with :
396
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
397
+ asset_path : ./bin/.pio/build/obspro/firmware.bin
398
+ asset_name : obspro-firmware.bin
399
+ asset_content_type : application/x-esp32
0 commit comments