Merge pull request #417 from MiG-41/patch-12 #90
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
name: Build binary | |
on: [push, pull_request] | |
env: | |
ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS: http://arduino.esp8266.com/stable/package_esp8266com_index.json | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Update version.h | |
if: github.ref != 'refs/heads/main' #do not change version in main branch run | |
run: cd HeishaMon && echo "static const char *heishamon_version = \"Alpha-$(git rev-parse --short HEAD)\";" > version.h && cat version.h | |
shell: bash | |
- name: Setup Arduino CLI | |
uses: arduino/[email protected] | |
- name: Install platform | |
run: | | |
arduino-cli core update-index | |
arduino-cli core install esp8266:esp8266 | |
- name: Install dependencies | |
run: arduino-cli lib install ringbuffer pubsubclient doubleresetdetect arduinojson dallastemperature onewire WebSockets | |
- name: Compile Sketch | |
run: cd HeishaMon && arduino-cli compile --output-dir . --fqbn=esp8266:esp8266:d1_mini:xtal=160,vt=flash,ssl=basic,mmu=3216,non32xfer=safe,eesz=4M2M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=921600 --warnings=none --verbose HeishaMon.ino | |
- name: Add MD5 checksum | |
run: cd HeishaMon && MD5=`md5sum HeishaMon.ino.bin | cut -d\ -f1` && mv HeishaMon.ino.bin HeishaMon-alpha-$MD5.bin | |
shell: bash | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: HeishaMon.ino.bin | |
path: HeishaMon/HeishaMon-*.bin |