Skip to content

Change GitHub Action to use arduino-cli #46

Change GitHub Action to use arduino-cli

Change GitHub Action to use arduino-cli #46

Workflow file for this run

name: X16 SMC firmware build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Setup Arduino CLI
uses: arduino/setup-arduino-cli@v1
- name: Install ATTinyCore platform
run: |
arduino-cli core update-index --additional-urls file://$PWD/package_drazzy.com_index.json
arduino-cli core install ATTinyCore:avr --additional-urls file://$PWD/package_drazzy.com_index.json
- name: Compile Arduino default sketch
run: arduino-cli compile -b ATTinyCore:avr:attinyx61 --build-path .build/default
- name: Compile Arduino sketch with Community X16 pin support
run: arduino-cli compile -b ATTinyCore:avr:attinyx61 --build-property "build.extra_flags=-DCOMMUNITYX16_PINS" --build-path .build/community
- name: Install IntelHex library
run: pip install intelhex
- name: Make default SMC.BIN file
run: python make_bin.py ./.build/default/x16-smc.ino.hex .build/default
- name: Make SMC.BIN file with CommunityX16 pin support
run: python make_bin.py ./.build/community/x16-smc.ino.hex .build/community
- name: Move readme files to build folders
run: |
mv .doc/readme-default .build/default/readme
mv .doc/readme-community .build/community/readme
- name: Archive default firmware
uses: actions/upload-artifact@v3
with:
name: SMC default firmware
path: |
.build/default/x16-smc.ino.hex
.build/default/SMC*.BIN
.build/default/readme
- name: Archive CommunityX16 firmware
uses: actions/upload-artifact@v3
with:
name: SMC CommunityX16 firmware
path: |
.build/community/x16-smc.ino.hex
.build/community/SMC*.BIN
.build/community/readme