Skip to content

Commit

Permalink
Create build-arduino.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
azvanderpas committed May 11, 2023
1 parent ab39fd2 commit d73660d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/ci/build-arduino.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

# Exit immediately if a command exits with a non-zero status.
set -e

# Enable the globstar shell option
shopt -s globstar

# Make sure we are inside the github workspace
cd $GITHUB_WORKSPACE

# Create directories
mkdir $HOME/Arduino
mkdir $HOME/Arduino/libraries

# Install Arduino IDE
export PATH=$PATH:$GITHUB_WORKSPACE/bin
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
arduino-cli config init
arduino-cli core update-index

# Install Arduino AVR core
arduino-cli core install arduino:avr

# Compile all *.ino files for the Arduino Uno
for f in **/*.ino ; do
arduino-cli compile -b arduino:avr:leonardo $f
done

0 comments on commit d73660d

Please sign in to comment.