Skip to content

Commit

Permalink
Create build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrouch authored Dec 24, 2024
1 parent e56fd8f commit 63eaa15
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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: esp32:esp32:m5stack-atoms3:CDCOnBoot=cdc
arduino-platform: esp32:esp32@2.0.17
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
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_esp32_sensors_hub/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

0 comments on commit 63eaa15

Please sign in to comment.