1- name : Arduino CI - TankAlarm 092025
1+ name : Arduino CI - TankAlarm 092025 & 112025
22
33on :
44 push :
55 branches : [main, master]
66 paths :
77 - ' TankAlarm-092025-Client-Hologram/**'
88 - ' TankAlarm-092025-Server-Hologram/**'
9+ - ' TankAlarm-112025-Client-BluesOpta/**'
10+ - ' TankAlarm-112025-Server-BluesOpta/**'
11+ - ' TankAlarm-112025-Viewer-BluesOpta/**'
912 - ' .github/workflows/arduino-ci.yml'
1013 pull_request :
1114 branches : [main, master]
1215 paths :
1316 - ' TankAlarm-092025-Client-Hologram/**'
1417 - ' TankAlarm-092025-Server-Hologram/**'
18+ - ' TankAlarm-112025-Client-BluesOpta/**'
19+ - ' TankAlarm-112025-Server-BluesOpta/**'
20+ - ' TankAlarm-112025-Viewer-BluesOpta/**'
1521 - ' .github/workflows/arduino-ci.yml'
1622 workflow_dispatch :
1723
3339 arduino-cli core update-index
3440 arduino-cli core install arduino:samd
3541
42+ - name : Install Arduino Mbed OS Opta Boards core
43+ run : |
44+ arduino-cli core update-index
45+ arduino-cli core install arduino:mbed_opta
46+
3647 - name : Install required libraries
3748 run : |
3849 arduino-cli lib update-index
4152 arduino-cli lib install "Arduino Low Power"
4253 arduino-cli lib install "RTCZero"
4354 arduino-cli lib install "Ethernet"
55+ arduino-cli lib install "ArduinoJson"
56+ arduino-cli lib install "Blues Wireless Notecard"
4457
4558 - name : Compile TankAlarm-092025-Client-Hologram
4659 id : compile-client
5669 arduino-cli compile --fqbn arduino:samd:mkrnb1500 \
5770 TankAlarm-092025-Server-Hologram/TankAlarm-092025-Server-Hologram.ino
5871
72+ - name : Compile TankAlarm-112025-Client-BluesOpta
73+ id : compile-112025-client
74+ continue-on-error : true
75+ run : |
76+ arduino-cli compile --fqbn arduino:mbed_opta:opta \
77+ TankAlarm-112025-Client-BluesOpta/TankAlarm-112025-Client-BluesOpta.ino
78+
79+ - name : Compile TankAlarm-112025-Server-BluesOpta
80+ id : compile-112025-server
81+ continue-on-error : true
82+ run : |
83+ arduino-cli compile --fqbn arduino:mbed_opta:opta \
84+ TankAlarm-112025-Server-BluesOpta/TankAlarm-112025-Server-BluesOpta.ino
85+
86+ - name : Compile TankAlarm-112025-Viewer-BluesOpta
87+ id : compile-112025-viewer
88+ continue-on-error : true
89+ run : |
90+ arduino-cli compile --fqbn arduino:mbed_opta:opta \
91+ TankAlarm-112025-Viewer-BluesOpta/TankAlarm-112025-Viewer-BluesOpta.ino
92+
5993 - name : Create issue on compilation failure
60- if : steps.compile-client.outcome == 'failure' || steps.compile-server.outcome == 'failure'
94+ if : |
95+ steps.compile-client.outcome == 'failure' ||
96+ steps.compile-server.outcome == 'failure' ||
97+ steps.compile-112025-client.outcome == 'failure' ||
98+ steps.compile-112025-server.outcome == 'failure' ||
99+ steps.compile-112025-viewer.outcome == 'failure'
61100 uses : actions/github-script@v7
62101 with :
63102 github-token : ${{ secrets.GITHUB_TOKEN }}
@@ -68,41 +107,47 @@ jobs:
68107 // Determine which sketch(es) failed
69108 const clientFailed = '${{ steps.compile-client.outcome }}' === 'failure';
70109 const serverFailed = '${{ steps.compile-server.outcome }}' === 'failure';
110+ const client112025Failed = '${{ steps.compile-112025-client.outcome }}' === 'failure';
111+ const server112025Failed = '${{ steps.compile-112025-server.outcome }}' === 'failure';
112+ const viewer112025Failed = '${{ steps.compile-112025-viewer.outcome }}' === 'failure';
71113
72- let sketchName = '';
73- let searchPattern = '';
74- if (clientFailed && serverFailed) {
75- sketchName = 'TankAlarm-092025 Client and Server';
76- searchPattern = 'Arduino Compilation Error in TankAlarm-092025';
77- } else if (clientFailed) {
78- sketchName = 'TankAlarm-092025-Client-Hologram';
79- searchPattern = 'Arduino Compilation Error in TankAlarm-092025-Client-Hologram';
80- } else {
81- sketchName = 'TankAlarm-092025-Server-Hologram';
82- searchPattern = 'Arduino Compilation Error in TankAlarm-092025-Server-Hologram';
83- }
114+ const failedSketches = [];
115+ if (clientFailed) failedSketches.push('TankAlarm-092025-Client-Hologram');
116+ if (serverFailed) failedSketches.push('TankAlarm-092025-Server-Hologram');
117+ if (client112025Failed) failedSketches.push('TankAlarm-112025-Client-BluesOpta');
118+ if (server112025Failed) failedSketches.push('TankAlarm-112025-Server-BluesOpta');
119+ if (viewer112025Failed) failedSketches.push('TankAlarm-112025-Viewer-BluesOpta');
120+
121+ const sketchName = failedSketches.length === 1 ? failedSketches[0] :
122+ failedSketches.length > 1 ? 'Multiple Sketches' : 'Unknown';
123+ const searchPattern = 'Arduino Compilation Error';
84124
85125 const issueTitle = `Arduino Compilation Error in ${sketchName} (${date})`;
86126 const workflowUrl = '${{ github.server_url }}/' +
87127 '${{ github.repository }}/actions/runs/${{ github.run_id }}';
88128
89129 let detailsSection = '### Details\n';
90- if (clientFailed) {
91- detailsSection += `- **Client Sketch:** TankAlarm-092025-Client-Hologram/` +
92- `TankAlarm-092025-Client-Hologram.ino ❌\n`;
93- } else {
94- detailsSection += `- **Client Sketch:** TankAlarm-092025-Client-Hologram/` +
95- `TankAlarm-092025-Client-Hologram.ino ✅\n`;
96- }
97- if (serverFailed) {
98- detailsSection += `- **Server Sketch:** TankAlarm-092025-Server-Hologram/` +
99- `TankAlarm-092025-Server-Hologram.ino ❌\n`;
100- } else {
101- detailsSection += `- **Server Sketch:** TankAlarm-092025-Server-Hologram/` +
102- `TankAlarm-092025-Server-Hologram.ino ✅\n`;
103- }
104- detailsSection += `- **Board:** Arduino MKR NB 1500 (arduino:samd:mkrnb1500)\n`;
105- detailsSection += `- **Triggered by:** ${{ github.event_name }}`;
130+
131+ // TankAlarm-092025 sketches
132+ detailsSection += `#### TankAlarm-092025 (MKR NB 1500)\n`;
133+ detailsSection += `- **Client Sketch:** TankAlarm-092025-Client-Hologram/` +
134+ `TankAlarm-092025-Client-Hologram.ino ${clientFailed ? '❌' : '✅'}\n`;
135+ detailsSection += `- **Server Sketch:** TankAlarm-092025-Server-Hologram/` +
136+ `TankAlarm-092025-Server-Hologram.ino ${serverFailed ? '❌' : '✅'}\n`;
137+
138+ // TankAlarm-112025 sketches
139+ detailsSection += `\n#### TankAlarm-112025 (Arduino Opta)\n`;
140+ detailsSection += `- **Client Sketch:** TankAlarm-112025-Client-BluesOpta/` +
141+ `TankAlarm-112025-Client-BluesOpta.ino ${client112025Failed ? '❌' : '✅'}\n`;
142+ detailsSection += `- **Server Sketch:** TankAlarm-112025-Server-BluesOpta/` +
143+ `TankAlarm-112025-Server-BluesOpta.ino ${server112025Failed ? '❌' : '✅'}\n`;
144+ detailsSection += `- **Viewer Sketch:** TankAlarm-112025-Viewer-BluesOpta/` +
145+ `TankAlarm-112025-Viewer-BluesOpta.ino ${viewer112025Failed ? '❌' : '✅'}\n`;
146+
147+ detailsSection += `\n**Boards:**\n`;
148+ detailsSection += `- Arduino MKR NB 1500 (arduino:samd:mkrnb1500)\n`;
149+ detailsSection += `- Arduino Opta (arduino:mbed_opta:opta)\n`;
150+ detailsSection += `\n**Triggered by:** ${{ github.event_name }}`;
106151
107152 const issueBody = `## Arduino Compilation Failed
108153
@@ -161,5 +206,10 @@ jobs:
161206 }
162207
163208 - name : Fail workflow if compilation failed
164- if : steps.compile-client.outcome == 'failure' || steps.compile-server.outcome == 'failure'
209+ if : |
210+ steps.compile-client.outcome == 'failure' ||
211+ steps.compile-server.outcome == 'failure' ||
212+ steps.compile-112025-client.outcome == 'failure' ||
213+ steps.compile-112025-server.outcome == 'failure' ||
214+ steps.compile-112025-viewer.outcome == 'failure'
165215 run : exit 1
0 commit comments