Skip to content

Commit 8eaf962

Browse files
committed
CI: name firmware artifacts heltec3/heltec4-tracker, add .hex output
1 parent 00b4231 commit 8eaf962

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
environment: [vehicle, vehicle_v4]
15+
include:
16+
- environment: vehicle
17+
name: heltec3-tracker
18+
- environment: vehicle_v4
19+
name: heltec4-tracker
1620
steps:
1721
- uses: actions/checkout@v4
1822

@@ -31,15 +35,21 @@ jobs:
3135
pio-${{ runner.os }}-${{ matrix.environment }}-
3236
3337
- name: Install PlatformIO
34-
run: pip install platformio
38+
run: pip install platformio intelhex
3539

3640
- name: Build ${{ matrix.environment }}
3741
run: pio run -e ${{ matrix.environment }}
3842

43+
# .bin is the app image (flash at 0x10000); .hex carries that offset in
44+
# its records so hex-aware tools flash it to the right place
45+
- name: Package firmware
46+
run: |
47+
mkdir -p artifacts
48+
cp .pio/build/${{ matrix.environment }}/firmware.bin artifacts/${{ matrix.name }}.bin
49+
python -c "from intelhex import IntelHex; ih = IntelHex(); ih.loadbin('.pio/build/${{ matrix.environment }}/firmware.bin', offset=0x10000); ih.write_hex_file('artifacts/${{ matrix.name }}.hex')"
50+
3951
- name: Upload firmware
4052
uses: actions/upload-artifact@v4
4153
with:
42-
name: ${{ matrix.environment }}-firmware
43-
path: |
44-
.pio/build/${{ matrix.environment }}/firmware.bin
45-
.pio/build/${{ matrix.environment }}/firmware.elf
54+
name: ${{ matrix.name }}
55+
path: artifacts/

0 commit comments

Comments
 (0)