Skip to content

Commit

Permalink
Update build process to compile all example sketches
Browse files Browse the repository at this point in the history
for Arduino UNO
  • Loading branch information
virtual-maker committed Jan 1, 2025
1 parent 87f608a commit 513d4ca
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/.ci_scripts/Arduino-AVR-UNO-excludes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
examples/GatewayESP8266/GatewayESP8266.ino
examples/GatewayESP8266MQTTClient/GatewayESP8266MQTTClient.ino
examples/GatewayESP8266SecureMQTTClient/GatewayESP8266SecureMQTTClient.ino
examples/GatewayESP8266OTA/GatewayESP8266OTA.ino
examples/GatewayESP32/GatewayESP32.ino
examples/GatewayESP32OTA/GatewayESP32OTA.ino
examples/GatewayESP32MQTTClient/GatewayESP32MQTTClient.ino
examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino
18 changes: 18 additions & 0 deletions .github/workflows/.ci_scripts/compile-arduino-AVR-UNO-sketches.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# Read the blacklist file into an array
if [ -f Arduino-AVR-excludes ]; then
mapfile -t excludes < Arduino-AVR-UNO-excludes
else
excludes=()
fi

# Find all .ino files and compile each one, excluding those in the blacklist
find ./examples -name "*.ino" | while read sketch; do
if [[ ! " ${excludes[@]} " =~ " ${sketch} " ]]; then
echo "Compiling $sketch"
arduino-cli compile --fqbn arduino:avr:uno "$sketch"
else
echo "Skipping $sketch (blacklisted)"
fi
done
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,6 @@ jobs:
- name: Compile sketch
run: |
arduino-cli compile --fqbn arduino:avr:uno ./examples/LightSensor/LightSensor.ino
- name: Compile all sketches from examples folder
run: ./.github/workflows/.ci_scripts/compile-arduino-AVR-UNO-sketches.sh

0 comments on commit 513d4ca

Please sign in to comment.