-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |