Remove unnecessary docs install command #27
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 | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
board: ["Arduino Uno", "Arduino Leonardo", "Arduino Mega 2560"] | |
include: | |
- board: "Arduino Uno" # board name, human-readable (matching board array above) | |
platform: "arduino:avr" # board platform, to be installed by the CLI | |
fqbn: "arduino:avr:uno" # fully qualified board name | |
- board: "Arduino Leonardo" | |
platform: "arduino:avr" | |
fqbn: "arduino:avr:leonardo" | |
- board: "Arduino Mega 2560" | |
platform: "arduino:avr" | |
fqbn: "arduino:avr:mega:cpu=atmega2560" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Arduino CLI | |
uses: arduino/setup-arduino-cli@v1.1.1 | |
- name: Install Board Platform | |
run: | | |
arduino-cli core update-index | |
arduino-cli core install ${{ matrix.platform }} | |
- name: Install Dependencies | |
run: | | |
arduino-cli lib install "Adafruit NeoPixel" | |
arduino-cli lib install FastLED | |
- name: Add Library Symbolic Link to Repo | |
run: | | |
mkdir --parents "$HOME/Arduino/libraries" | |
ln --symbolic "$PWD" "$HOME/Arduino/libraries/." | |
- name: Compile Library Examples | |
run: | | |
buildSketchPath() { | |
sktch=${1##*/examples/}; | |
sktch=${sktch%/*.ino}; | |
echo -e "\nBuilding sketch $sktch.ino"; | |
arduino-cli compile --fqbn ${{ matrix.fqbn }} "$1"; | |
} | |
buildExamples() { | |
IFS=$'\n'; set -f; | |
for f in $(find $PWD/examples/ -name '*.ino'); | |
do | |
buildSketchPath $f; | |
done; | |
unset IFS; set +f; | |
} | |
buildExamples |