mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 13:52:15 +01:00
ci: attach each board's firmware ELF to releases
A crash log on a release build couldn't be decoded: the release had only the .bin files, and the ELF was a 5-day CI artifact of other runs. The panic in #31 names "ELF file SHA256: f85f409205c11d1b" and no copy of that file exists. Each release now gets SomfyController.ino.<chip>.elf.zip, built in the same job as the .bin it decodes. Beside the ELF is its .sha256: the .bin embeds that hash, and the panic prints its first digits, so a log shows which build it came from. The bug report form asks for the whole panic and says how to decode it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1c66c310bd
commit
8600c5e811
2 changed files with 33 additions and 1 deletions
7
.github/ISSUE_TEMPLATE/BUG-REPORT.yaml
vendored
7
.github/ISSUE_TEMPLATE/BUG-REPORT.yaml
vendored
|
|
@ -67,7 +67,12 @@ body:
|
||||||
id: logs
|
id: logs
|
||||||
attributes:
|
attributes:
|
||||||
label: "Logs"
|
label: "Logs"
|
||||||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
description: |
|
||||||
|
Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
||||||
|
> After a crash, include the whole panic: the `Guru Meditation Error` line, the `Backtrace:` line and the `ELF file SHA256:` line.
|
||||||
|
> Each release has a `SomfyController.ino.<chip>.elf.zip` that decodes the backtrace:
|
||||||
|
> `xtensa-esp32s3-elf-addr2line -pfiaC -e SomfyController.ino.esp32s3.elf <backtrace addresses>`
|
||||||
|
> (`riscv32-esp-elf-addr2line` on the C3, C5 and C6).
|
||||||
render: bash
|
render: bash
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
27
.github/workflows/build.yaml
vendored
27
.github/workflows/build.yaml
vendored
|
|
@ -58,6 +58,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# fwname: firmware-only binary for OTA updates
|
# fwname: firmware-only binary for OTA updates
|
||||||
|
# elfname: the symbols of that binary, to decode a crash's backtrace
|
||||||
# obname: onboard image (bootloader + partitions + firmware + littlefs merged)
|
# obname: onboard image (bootloader + partitions + firmware + littlefs merged)
|
||||||
# for flashing a new chip via USB/serial
|
# for flashing a new chip via USB/serial
|
||||||
# addr_bootloader: chip-dependent (ESP32: 0x1000, S3/C3/C6: 0x0, C5: 0x2000)
|
# addr_bootloader: chip-dependent (ESP32: 0x1000, S3/C3/C6: 0x0, C5: 0x2000)
|
||||||
|
|
@ -70,6 +71,7 @@ jobs:
|
||||||
addr_bootloader: "0x1000"
|
addr_bootloader: "0x1000"
|
||||||
addr_fs: "0x310000"
|
addr_fs: "0x310000"
|
||||||
fwname: SomfyController.ino.esp32.bin
|
fwname: SomfyController.ino.esp32.bin
|
||||||
|
elfname: SomfyController.ino.esp32.elf
|
||||||
fsname: SomfyController.littlefs.esp32.bin
|
fsname: SomfyController.littlefs.esp32.bin
|
||||||
obname: SomfyController.onboard.esp32.bin
|
obname: SomfyController.onboard.esp32.bin
|
||||||
- env: esp32s3
|
- env: esp32s3
|
||||||
|
|
@ -78,6 +80,7 @@ jobs:
|
||||||
addr_bootloader: "0x0"
|
addr_bootloader: "0x0"
|
||||||
addr_fs: "0x670000"
|
addr_fs: "0x670000"
|
||||||
fwname: SomfyController.ino.esp32s3.bin
|
fwname: SomfyController.ino.esp32s3.bin
|
||||||
|
elfname: SomfyController.ino.esp32s3.elf
|
||||||
fsname: SomfyController.littlefs.esp32s3.bin
|
fsname: SomfyController.littlefs.esp32s3.bin
|
||||||
obname: SomfyController.onboard.esp32s3.bin
|
obname: SomfyController.onboard.esp32s3.bin
|
||||||
- env: esp32c3
|
- env: esp32c3
|
||||||
|
|
@ -86,6 +89,7 @@ jobs:
|
||||||
addr_bootloader: "0x0"
|
addr_bootloader: "0x0"
|
||||||
addr_fs: "0x310000"
|
addr_fs: "0x310000"
|
||||||
fwname: SomfyController.ino.esp32c3.bin
|
fwname: SomfyController.ino.esp32c3.bin
|
||||||
|
elfname: SomfyController.ino.esp32c3.elf
|
||||||
fsname: SomfyController.littlefs.esp32c3.bin
|
fsname: SomfyController.littlefs.esp32c3.bin
|
||||||
obname: SomfyController.onboard.esp32c3.bin
|
obname: SomfyController.onboard.esp32c3.bin
|
||||||
- env: esp32c5
|
- env: esp32c5
|
||||||
|
|
@ -94,6 +98,7 @@ jobs:
|
||||||
addr_bootloader: "0x2000"
|
addr_bootloader: "0x2000"
|
||||||
addr_fs: "0x310000"
|
addr_fs: "0x310000"
|
||||||
fwname: SomfyController.ino.esp32c5.bin
|
fwname: SomfyController.ino.esp32c5.bin
|
||||||
|
elfname: SomfyController.ino.esp32c5.elf
|
||||||
fsname: SomfyController.littlefs.esp32c5.bin
|
fsname: SomfyController.littlefs.esp32c5.bin
|
||||||
obname: SomfyController.onboard.esp32c5.bin
|
obname: SomfyController.onboard.esp32c5.bin
|
||||||
- env: esp32c6
|
- env: esp32c6
|
||||||
|
|
@ -102,6 +107,7 @@ jobs:
|
||||||
addr_bootloader: "0x0"
|
addr_bootloader: "0x0"
|
||||||
addr_fs: "0x310000"
|
addr_fs: "0x310000"
|
||||||
fwname: SomfyController.ino.esp32c6.bin
|
fwname: SomfyController.ino.esp32c6.bin
|
||||||
|
elfname: SomfyController.ino.esp32c6.elf
|
||||||
fsname: SomfyController.littlefs.esp32c6.bin
|
fsname: SomfyController.littlefs.esp32c6.bin
|
||||||
obname: SomfyController.onboard.esp32c6.bin
|
obname: SomfyController.onboard.esp32c6.bin
|
||||||
|
|
||||||
|
|
@ -173,6 +179,16 @@ jobs:
|
||||||
- name: Compress onboard image
|
- name: Compress onboard image
|
||||||
run: zip ${{ matrix.obname }}.zip ${{ matrix.obname }}
|
run: zip ${{ matrix.obname }}.zip ${{ matrix.obname }}
|
||||||
|
|
||||||
|
# A panic prints "ELF file SHA256: <first hex digits>". The .sha256 file
|
||||||
|
# beside the ELF holds the whole hash, so a crash log shows which build
|
||||||
|
# it came from.
|
||||||
|
- name: Compress ELF
|
||||||
|
run: |
|
||||||
|
cp .pio/build/${{ matrix.env }}/firmware.elf ${{ matrix.elfname }}
|
||||||
|
sha256sum ${{ matrix.elfname }} > ${{ matrix.elfname }}.sha256
|
||||||
|
cat ${{ matrix.elfname }}.sha256
|
||||||
|
zip -9 ${{ matrix.elfname }}.zip ${{ matrix.elfname }} ${{ matrix.elfname }}.sha256
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
if: github.event_name != 'release'
|
if: github.event_name != 'release'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|
@ -217,3 +233,14 @@ jobs:
|
||||||
asset_path: ${{ matrix.obname }}.zip
|
asset_path: ${{ matrix.obname }}.zip
|
||||||
overwrite: true
|
overwrite: true
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
|
|
||||||
|
- name: Upload ELF
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
uses: shogo82148/actions-upload-release-asset@v1.7.5
|
||||||
|
with:
|
||||||
|
github_token: ${{ github.token }}
|
||||||
|
upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||||
|
asset_name: ${{ matrix.elfname }}.zip
|
||||||
|
asset_path: ${{ matrix.elfname }}.zip
|
||||||
|
overwrite: true
|
||||||
|
asset_content_type: application/zip
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue