|
| 1 | +name: Compile Examples |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + paths: |
| 6 | + - ".github/workflows/compile-examples.yml" |
| 7 | + - "library.properties" |
| 8 | + - "examples/**" |
| 9 | + - "src/**" |
| 10 | + push: |
| 11 | + paths: |
| 12 | + - ".github/workflows/compile-examples.yml" |
| 13 | + - "library.properties" |
| 14 | + - "examples/**" |
| 15 | + - "src/**" |
| 16 | + schedule: |
| 17 | + # Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms). |
| 18 | + - cron: "0 8 * * TUE" |
| 19 | + workflow_dispatch: |
| 20 | + repository_dispatch: |
| 21 | + |
| 22 | +jobs: |
| 23 | + build: |
| 24 | + name: ${{ matrix.board.fqbn }} |
| 25 | + runs-on: ubuntu-latest |
| 26 | + |
| 27 | + env: |
| 28 | + LIBRARIES: | |
| 29 | + # Install the NetworkConfigurator library from the repository |
| 30 | + - source-path: ./ |
| 31 | + - name: Arduino_DebugUtils |
| 32 | + - name: Arduino_ConnectionHandler |
| 33 | + - name: ArduinoBLE |
| 34 | + - name: ArduinoIoTCloud |
| 35 | + - name: Arduino_SecureElement |
| 36 | + SKETCH_PATHS: | |
| 37 | + - examples/auto-retry |
| 38 | + SKETCHES_REPORTS_PATH: sketches-reports |
| 39 | + strategy: |
| 40 | + fail-fast: false |
| 41 | + |
| 42 | + matrix: |
| 43 | + board: |
| 44 | + - fqbn: arduino:samd:mkr1000 |
| 45 | + type: mkr1000 |
| 46 | + artifact-name-suffix: arduino-samd-mkr1000 |
| 47 | + - fqbn: arduino:samd:mkrwifi1010 |
| 48 | + type: nina |
| 49 | + artifact-name-suffix: arduino-samd-mkrwifi1010 |
| 50 | + - fqbn: arduino:samd:nano_33_iot |
| 51 | + type: nina |
| 52 | + artifact-name-suffix: arduino-samd-nano_33_iot |
| 53 | + - fqbn: arduino:samd:mkrwan1300 |
| 54 | + type: wan |
| 55 | + artifact-name-suffix: arduino-samd-mkrwan1300 |
| 56 | + - fqbn: arduino:samd:mkrgsm1400 |
| 57 | + type: gsm |
| 58 | + artifact-name-suffix: arduino-samd-mkrgsm1400 |
| 59 | + - fqbn: arduino:samd:mkrnb1500 |
| 60 | + type: nb |
| 61 | + artifact-name-suffix: arduino-samd-mkrnb1500 |
| 62 | + - fqbn: arduino:mbed_portenta:envie_m7 |
| 63 | + type: mbed_portenta |
| 64 | + artifact-name-suffix: arduino-mbed_portenta-envie_m7 |
| 65 | + - fqbn: esp8266:esp8266:huzzah |
| 66 | + type: esp8266 |
| 67 | + artifact-name-suffix: esp8266-esp8266-huzzah |
| 68 | + - fqbn: esp32:esp32:esp32 |
| 69 | + type: esp32 |
| 70 | + artifact-name-suffix: esp32-esp32-esp32 |
| 71 | + - fqbn: arduino:mbed_nano:nanorp2040connect |
| 72 | + type: nina |
| 73 | + artifact-name-suffix: arduino-mbed_nano-nanorp2040connect |
| 74 | + - fqbn: arduino:mbed_nicla:nicla_vision |
| 75 | + type: mbed_nicla |
| 76 | + artifact-name-suffix: arduino-mbed_nicla-nicla_vision |
| 77 | + - fqbn: arduino:mbed_opta:opta |
| 78 | + type: mbed_opta |
| 79 | + artifact-name-suffix: arduino-mbed_opta-opta |
| 80 | + - fqbn: arduino:mbed_giga:giga |
| 81 | + type: mbed_giga |
| 82 | + artifact-name-suffix: arduino-mbed_giga-giga |
| 83 | + - fqbn: arduino:renesas_portenta:portenta_c33 |
| 84 | + type: renesas_portenta |
| 85 | + artifact-name-suffix: arduino-renesas_portenta-portenta_c33 |
| 86 | + - fqbn: arduino:renesas_uno:unor4wifi |
| 87 | + type: renesas_uno |
| 88 | + artifact-name-suffix: arduino-renesas_uno-unor4wifi |
| 89 | + - fqbn: arduino:esp32:nano_nora |
| 90 | + type: arduino_esp32 |
| 91 | + artifact-name-suffix: arduino-esp32-nano_nora |
| 92 | + - fqbn: arduino:mbed_edge:edge_control |
| 93 | + type: mbed_edge |
| 94 | + artifact-name-suffix: arduino-mbed_edge-edge_control |
| 95 | + |
| 96 | + |
| 97 | + # make board type-specific customizations to the matrix jobs |
| 98 | + include: |
| 99 | + # MKR 1000 |
| 100 | + - board: |
| 101 | + type: mkr1000 |
| 102 | + platforms: | |
| 103 | + # Install samd platform via Boards Manager |
| 104 | + - name: arduino:samd |
| 105 | + libraries: | |
| 106 | + - name: ArduinoECCX08 |
| 107 | + - name: Blues Wireless Notecard |
| 108 | + - name: RTCZero |
| 109 | + - name: WiFi101 |
| 110 | + - name: ArduinoHttpClient |
| 111 | + - name: ArduinoMqttClient |
| 112 | + - source-url: https://github.com/adafruit/Adafruit_SleepyDog.git |
| 113 | + # MKR WiFi 1010, Nano 33 IoT, Nano RP2040 Connect |
| 114 | + - board: |
| 115 | + type: nina |
| 116 | + platforms: | |
| 117 | + # Install samd and mbed_nano platform via Boards Manager |
| 118 | + - name: arduino:samd |
| 119 | + - name: arduino:mbed_nano |
| 120 | + libraries: | |
| 121 | + - name: ArduinoECCX08 |
| 122 | + - name: Blues Wireless Notecard |
| 123 | + - name: RTCZero |
| 124 | + - name: WiFiNINA |
| 125 | + - name: Arduino_JSON |
| 126 | + - name: ArduinoHttpClient |
| 127 | + - name: ArduinoMqttClient |
| 128 | + - source-url: https://github.com/adafruit/Adafruit_SleepyDog.git |
| 129 | + - board: |
| 130 | + type: wan |
| 131 | + platforms: | |
| 132 | + # Install samd platform via Boards Manager |
| 133 | + - name: arduino:samd |
| 134 | + libraries: | |
| 135 | + - name: ArduinoECCX08 |
| 136 | + - name: Blues Wireless Notecard |
| 137 | + - name: RTCZero |
| 138 | + - name: MKRWAN |
| 139 | + - source-url: https://github.com/adafruit/Adafruit_SleepyDog.git |
| 140 | + # GSM boards |
| 141 | + - board: |
| 142 | + type: gsm |
| 143 | + platforms: | |
| 144 | + # Install samd platform via Boards Manager |
| 145 | + - name: arduino:samd |
| 146 | + libraries: | |
| 147 | + - name: ArduinoECCX08 |
| 148 | + - name: Blues Wireless Notecard |
| 149 | + - name: RTCZero |
| 150 | + - name: MKRGSM |
| 151 | + - name: ArduinoHttpClient |
| 152 | + - name: ArduinoMqttClient |
| 153 | + - source-url: https://github.com/adafruit/Adafruit_SleepyDog.git |
| 154 | + # NB boards |
| 155 | + - board: |
| 156 | + type: nb |
| 157 | + platforms: | |
| 158 | + # Install samd platform via Boards Manager |
| 159 | + - name: arduino:samd |
| 160 | + libraries: | |
| 161 | + - name: ArduinoECCX08 |
| 162 | + - name: Blues Wireless Notecard |
| 163 | + - name: RTCZero |
| 164 | + - name: MKRNB |
| 165 | + - name: ArduinoHttpClient |
| 166 | + - name: ArduinoMqttClient |
| 167 | + - source-url: https://github.com/adafruit/Adafruit_SleepyDog.git |
| 168 | + # Portenta |
| 169 | + - board: |
| 170 | + type: mbed_portenta |
| 171 | + platforms: | |
| 172 | + # Install mbed_portenta platform via Boards Manager |
| 173 | + - name: arduino:mbed_portenta |
| 174 | + libraries: | |
| 175 | + - name: ArduinoECCX08 |
| 176 | + - name: Arduino_Cellular |
| 177 | + - name: Blues Wireless Notecard |
| 178 | + - name: ArduinoHttpClient |
| 179 | + - name: ArduinoMqttClient |
| 180 | + # Nicla Vision |
| 181 | + - board: |
| 182 | + type: mbed_nicla |
| 183 | + platforms: | |
| 184 | + # Install mbed_nicla platform via Boards Manager |
| 185 | + - name: arduino:mbed_nicla |
| 186 | + libraries: | |
| 187 | + - name: Blues Wireless Notecard |
| 188 | + - name: ArduinoHttpClient |
| 189 | + - name: ArduinoMqttClient |
| 190 | + # Opta |
| 191 | + - board: |
| 192 | + type: mbed_opta |
| 193 | + platforms: | |
| 194 | + # Install mbed_opta platform via Boards Manager |
| 195 | + - name: arduino:mbed_opta |
| 196 | + libraries: | |
| 197 | + - name: ArduinoECCX08 |
| 198 | + - name: Blues Wireless Notecard |
| 199 | + - name: ArduinoHttpClient |
| 200 | + - name: ArduinoMqttClient |
| 201 | + # GIGA |
| 202 | + - board: |
| 203 | + type: mbed_giga |
| 204 | + platforms: | |
| 205 | + # Install mbed_giga platform via Boards Manager |
| 206 | + - name: arduino:mbed_giga |
| 207 | + libraries: | |
| 208 | + - name: ArduinoECCX08 |
| 209 | + - name: Blues Wireless Notecard |
| 210 | + - name: ArduinoHttpClient |
| 211 | + - name: ArduinoMqttClient |
| 212 | + # Portenta C33 |
| 213 | + - board: |
| 214 | + type: renesas_portenta |
| 215 | + platforms: | |
| 216 | + # Install renesas_portenta platform via Boards Manager |
| 217 | + - name: arduino:renesas_portenta |
| 218 | + libraries: | |
| 219 | + - name: Arduino_Cellular |
| 220 | + - name: Blues Wireless Notecard |
| 221 | + - name: ArduinoHttpClient |
| 222 | + - name: ArduinoMqttClient |
| 223 | + # UNO R4 WiFi |
| 224 | + - board: |
| 225 | + type: renesas_uno |
| 226 | + platforms: | |
| 227 | + # Install renesas_uno platform via Boards Manager |
| 228 | + - name: arduino:renesas_uno |
| 229 | + libraries: | |
| 230 | + - name: Blues Wireless Notecard |
| 231 | + - name: ArduinoHttpClient |
| 232 | + - name: ArduinoMqttClient |
| 233 | + # Nano ESP32 |
| 234 | + - board: |
| 235 | + type: arduino_esp32 |
| 236 | + platforms: | |
| 237 | + # Install arduino_esp32 platform via Boards Manager |
| 238 | + - name: arduino:esp32 |
| 239 | + libraries: | |
| 240 | + - name: Blues Wireless Notecard |
| 241 | + - name: ArduinoHttpClient |
| 242 | + - name: ArduinoMqttClient |
| 243 | + # Edge Control |
| 244 | + - board: |
| 245 | + type: mbed_edge |
| 246 | + platforms: | |
| 247 | + # Install mbed_edge platform via Boards Manager |
| 248 | + - name: arduino:mbed_edge |
| 249 | + libraries: | |
| 250 | + - name: Blues Wireless Notecard |
| 251 | + - name: ArduinoHttpClient |
| 252 | + - name: ArduinoMqttClient |
| 253 | + # ESP8266 boards |
| 254 | + - board: |
| 255 | + type: esp8266 |
| 256 | + platforms: | |
| 257 | + # Install ESP8266 platform via Boards Manager |
| 258 | + - name: esp8266:esp8266 |
| 259 | + source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json |
| 260 | + # Use the version currently installed in Arduino Cloud |
| 261 | + version: 2.5.0 |
| 262 | + libraries: |
| 263 | + # ESP32 boards |
| 264 | + - board: |
| 265 | + type: esp32 |
| 266 | + platforms: | |
| 267 | + # Install ESP32 platform via Boards Manager |
| 268 | + - name: esp32:esp32 |
| 269 | + source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json |
| 270 | + libraries: | |
| 271 | + - name: Blues Wireless Notecard |
| 272 | +
|
| 273 | + steps: |
| 274 | + - name: Checkout |
| 275 | + uses: actions/checkout@v4 |
| 276 | + |
| 277 | + - name: Install ESP32 platform dependencies |
| 278 | + if: matrix.board.type == 'esp32' |
| 279 | + run: pip3 install pyserial |
| 280 | + |
| 281 | + - name: Compile examples |
| 282 | + uses: arduino/compile-sketches@v1 |
| 283 | + with: |
| 284 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 285 | + platforms: ${{ matrix.platforms }} |
| 286 | + fqbn: ${{ matrix.board.fqbn }} |
| 287 | + libraries: | |
| 288 | + ${{ env.LIBRARIES }} |
| 289 | + ${{ matrix.libraries }} |
| 290 | + sketch-paths: | |
| 291 | + ${{ env.SKETCH_PATHS }} |
| 292 | + enable-deltas-report: 'true' |
| 293 | + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 294 | + |
| 295 | + - name: Save memory usage change report as artifact |
| 296 | + if: github.event_name == 'pull_request' |
| 297 | + uses: actions/upload-artifact@v4 |
| 298 | + with: |
| 299 | + if-no-files-found: error |
| 300 | + name: sketches-report-${{ matrix.board.artifact-name-suffix }} |
| 301 | + path: ${{ env.SKETCHES_REPORTS_PATH }} |
0 commit comments