Skip to content

Commit 9a89e36

Browse files
committed
Update compile script and build workflow
Updated build.yml to use MySensors-SAMD-excludes for SAMD board compilation. Added new exclusion file MySensors-SAMD-excludes with specific example entries.
1 parent 3656b32 commit 9a89e36

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
./config.library_root+'examples/BatteryPoweredSensor/BatteryPoweredSensor.ino
2+
./config.library_root+'examples/GatewayESP8266/GatewayESP8266.ino
3+
./config.library_root+'examples/GatewayESP8266MQTTClient/GatewayESP8266MQTTClient.ino
4+
./config.library_root+'examples/GatewayESP8266SecureMQTTClient/GatewayESP8266SecureMQTTClient.ino
5+
./config.library_root+'examples/GatewayESP8266OTA/GatewayESP8266OTA.ino
6+
./config.library_root+'examples/GatewayGSMMQTTClient/GatewayGSMMQTTClient.ino
7+
./config.library_root+'examples/GatewayESP32/GatewayESP32.ino
8+
./config.library_root+'examples/GatewayESP32OTA/GatewayESP32OTA.ino
9+
./config.library_root+'examples/GatewayESP32MQTTClient/GatewayESP32MQTTClient.ino
10+
./config.library_root+'examples/GatewaySerialRS485/GatewaySerialRS485.ino
11+
./config.library_root+'examples/MotionSensorRS485/MotionSensorRS485.ino
Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
exit_result=0
23

34
# Fully Qualified Board Name (FQBN) of the board to compile for
45
FQBN="$1" # "arduino:avr:uno"
@@ -16,33 +17,19 @@ if [ -f "$EXCLUDES" ]; then
1617
grep -vE '^\s*#|^\s*$' "$EXCLUDES" > "$BLACKLIST_FILE"
1718
fi
1819

19-
#### Debugging output
20-
echo "Excluded files:"
21-
cat "$BLACKLIST_FILE"
22-
echo "<END>"
23-
2420
# Find all .ino files and compile each one, excluding those in the blacklist
25-
exit_result=0
2621
while read sketch; do
2722
if ! grep -Fxq "$sketch" "$BLACKLIST_FILE"; then
2823
echo "Compiling $sketch"
2924
arduino-cli compile --fqbn "$FQBN" "$sketch" --warnings more
3025
compile_result=$?
31-
echo "compile_result: $compile_result"
3226
if [ $compile_result -ne 0 ]; then
33-
echo "Compilation failed for $sketch"
3427
exit_result=1
3528
fi
36-
echo "result: $exit_result"
3729
else
3830
echo "Skipping $sketch (blacklisted)"
3931
fi
4032
done < <(find "$SKETCHES" -name "*.ino")
4133

4234
# Exit with error state
43-
echo "result: $exit_result"
4435
exit $exit_result
45-
46-
#if [ $result -ne 0 ]; then
47-
# exit 1
48-
#fi

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,17 +282,17 @@ jobs:
282282
EXCLUDES="./.github/workflows/.ci_scripts/Arduino-AVR-excludes"
283283
./.github/workflows/.ci_scripts/compile-arduino-sketches.sh $FQBN $SKETCHES $EXCLUDES
284284
285-
# MySensors AVR MySensorsGW
285+
# MySensors SAMD MySensorsGW
286286
- name: Compile MySensorsGW (tests)
287287
run: |
288288
FQBN="MySensors:samd:mysensors_gw_native"
289289
SKETCHES="./tests"
290-
EXCLUDES="./.github/workflows/.ci_scripts/Arduino-AVR-excludes"
290+
EXCLUDES="./.github/workflows/.ci_scripts/MySensors-SAMD-excludes"
291291
./.github/workflows/.ci_scripts/compile-arduino-sketches.sh $FQBN $SKETCHES $EXCLUDES
292292
293293
- name: Compile MySensorsGW (examples)
294294
run: |
295295
FQBN="MySensors:samd:mysensors_gw_native"
296296
SKETCHES="./examples"
297-
EXCLUDES="./.github/workflows/.ci_scripts/Arduino-AVR-excludes"
297+
EXCLUDES="./.github/workflows/.ci_scripts/MySensors-SAMD-excludes"
298298
./.github/workflows/.ci_scripts/compile-arduino-sketches.sh $FQBN $SKETCHES $EXCLUDES

0 commit comments

Comments
 (0)