Skip to content

Update build.yml

Update build.yml #37

Workflow file for this run

# see: https://github.com/marketplace/actions/test-compile-for-arduino
name: build
on: [push, pull_request]
jobs:
build:
name: build for MCU
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Compile sketch
uses: ArminJo/arduino-test-compile@v3
with:
#arduino-board-fqbn: m5stack:esp32:m5stack_atoms3:CDCOnBoot=cdc
#arduino-platform: esp32:esp32@2.3.1
#platform-url: https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
arduino-board-fqbn: esp32:esp32:m5stack_atoms3:CDCOnBoot=cdc
#arduino-platform: esp32:esp32@2.0.17
arduino-platform: esp32:esp32@3.1.0
platform-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
required-libraries: M5AtomS3@1.0.0,M5Unified@0.2.2,ESP32Console@1.2.2
build-properties: '{ "All": "-DCONFIG_ESP_CONSOLE_USB_CDC=1 -UCONFIG_ESP_CONSOLE_UART -DCONFIG_ESP_CONSOLE_SECONDARY_NONE=1" }'
sketch-names: "*.ino"
sketch-names-find-start: bbn_*
extra-arduino-cli-args: "--warnings default --build-property compiler.libraries.ldflags=-Wl,--allow-multiple-definition "
set-build-path: true
- name: Make merged .bin
run: >
python3 "$HOME/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool.py"
--chip esp32s3 merge_bin -o $HOME/work/bbn_m5atomS3_lite_console/bbn_m5atomS3_lite_console/build/bbn_m5atomS3_lite_console_firmware.bin
--flash_mode dio --flash_freq 80m --flash_size 4MB
0x0 "$HOME/work/bbn_m5atomS3_lite_console/bbn_m5atomS3_lite_console/build/bbn_m5atomS3_lite_console.ino.bootloader.bin"
0x8000 "$HOME/work/bbn_m5atomS3_lite_console/bbn_m5atomS3_lite_console/build/bbn_m5atomS3_lite_console.ino.partitions.bin"
0xe000 "$HOME/.arduino15/packages/esp32/hardware/esp32/2.0.17/tools/partitions/boot_app0.bin"
0x10000 "$HOME/work/bbn_m5atomS3_lite_console/bbn_m5atomS3_lite_console/build/bbn_m5atomS3_lite_console.ino.bin"
- name: Make zip
run: |
ls /home/runner/work/bbn_m5atomS3_lite_console/bbn_m5atomS3_lite_console/build/*.bin /home/runner/work/bbn_m5atomS3_lite_console/bbn_m5atomS3_lite_console/build/*.csv | zip bbn_m5atomS3_lite_console_bin-$(date +%Y-%m-%d).zip -j -@
pwd
ls *.zip
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: bbn_m5atomS3_lite_console_bin*.zip
tag: ${{ github.ref == 'refs/heads/main' && 'vTest' || github.ref }}
overwrite: true
file_glob: true